예제 #1
0
 protected function _initView()
 {
     $config = $this->getOption('configuration');
     $view = new \Zend_View();
     $view->doctype($config['view']['doctype']);
     $view->setEncoding($config['view']['encoding']);
     $view->headTitle($config['view']['title'])->setSeparator($config['view']['titleSeparator'])->setDefaultAttachOrder(\Zend_View_Helper_Placeholder_Container_Abstract::PREPEND);
     $view->headMeta()->setName('keywords', $config['view']['keywords'])->setName('description', $config['view']['description']);
     $view->addHelperPath('Pkr/View/Helper/', 'Pkr_View_Helper_');
     $view->partialLoop()->setObjectKey('object');
     // add it to the ViewRenderer
     $viewRenderer = \Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($view);
     \Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
     return $view;
 }