_registry->get( 'theme.loader' ) ->get_cache_dir( true ); $render_json = $this->_registry->get( 'http.response.render.strategy.json' ); $output['data'] = array( 'state' => (int)(false !== $cache_dir), ); $render_json->render( $output ); } /** * Sets Twig cache as unavailable and notifies admin. * * @param string $cache_dir Cache dir. * * @throws Ai1ec_Bootstrap_Exception */ public function set_unavailable( $cache_dir = AI1EC_TWIG_CACHE_PATH ) { $this->_registry->get( 'model.settings' ) ->set( 'twig_cache', AI1EC_CACHE_UNAVAILABLE ); } }