Ejemplo n.º 1
0
 /** Pre-dispatch routines. */
 public function preDispatch()
 {
     parent::preDispatch();
     if (file_exists(BASE_PATH . '/modules/' . $this->moduleName . '/views')) {
         $this->view->setScriptPath(BASE_PATH . '/modules/' . $this->moduleName . '/views');
     } elseif (file_exists(BASE_PATH . '/privateModules/' . $this->moduleName . '/views')) {
         $this->view->setScriptPath(BASE_PATH . '/privateModules/' . $this->moduleName . '/views');
     }
     if ($this->isTestingEnv()) {
         $this->disableLayout();
     } else {
         if (file_exists(BASE_PATH . '/modules/' . $this->moduleName . '/layouts/layout.phtml')) {
             $this->_helper->layout->setLayoutPath(BASE_PATH . '/modules/' . $this->moduleName . '/layouts');
         }
     }
 }
Ejemplo n.º 2
0
 /** Pre dispatch. */
 public function preDispatch()
 {
     parent::preDispatch();
     $this->view->setScriptPath(BASE_PATH . '/core/views/rest');
 }