Example #1
0
 public function _initView()
 {
     $view = new Twig_Adapter_Zend();
     $view->setScriptPath(APPLICATION_PATH . '/views/scripts/');
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($view);
 }
Example #2
0
 /**
  * initialize twig-view
  * 
  * @return void
  */
 public function init()
 {
     // bootstrap layout first
     try {
         $this->getBootstrap()->bootstrap('layout');
     } catch (Zend_Application_Bootstrap_Exception $e) {
         // we do not *require* a layout
     }
     // set twig as "main_view"
     $twigView = new Twig_Adapter_Zend(null, $this->getOptions());
     $twigView->register();
 }