Ejemplo n.º 1
0
 /**
  * Get configured view
  * @param Zend_Controller_Action $action
  * @return System_View_Xslt
  */
 public static function getViewFromAction(Zend_Controller_Action $action)
 {
     $bootstrap = $action->getInvokeArg('bootstrap');
     if ($bootstrap instanceof Zend_Application_Bootstrap_Bootstrap && $bootstrap->getResource('View') instanceof Zend_View_Abstract) {
         $view = clone $bootstrap->getResource('View');
     } else {
         $view = new System_View_Xslt();
     }
     $view->setScriptPath($action->view->getScriptPaths());
     return $view;
 }