コード例 #1
0
 public function preDispatch()
 {
     $this->_helper->authCheck();
     $this->_helper->aclCheck();
     $this->_helper->layout->setLayout('admin');
     parent::preDispatch();
 }
コード例 #2
0
ファイル: Error.php プロジェクト: rom1git/Centurion
 public function preDispatch()
 {
     parent::preDispatch();
     $this->_exception = $this->_getParam('error_handler');
     if ($this->_exception) {
         if (isset($this->_exception) && $this->_exception->exception->getMessage() == 'die') {
             return;
         }
         $this->_response->clearBody();
         $this->_response->append('error', null);
         switch ($this->_exception->type) {
             case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:
             case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:
             case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE:
                 $this->_httpCode = self::STATUS_NOT_FOUND;
                 $this->_priority = Zend_Log::INFO;
                 break;
             case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_OTHER:
                 switch (get_class($this->_exception->exception)) {
                     case 'Centurion_Controller_Action_Gone_Exception':
                         $this->_httpCode = self::STATUS_GONE;
                         $this->_priority = Zend_Log::INFO;
                         break;
                     case 'Zend_View_Exception':
                         $this->_httpCode = self::STATUS_INTERNAL_SERVER_ERROR;
                         $this->_priority = Zend_Log::WARN;
                         break;
                     case 'Zend_Db_Exception':
                         $this->_httpCode = self::STATUS_INTERNAL_SERVER_ERROR;
                         $this->_priority = Zend_Log::CRIT;
                         break;
                     default:
                         $this->_httpCode = self::STATUS_INTERNAL_SERVER_ERROR;
                         $this->_priority = Zend_Log::CRIT;
                         break;
                 }
                 break;
         }
     }
 }
コード例 #3
0
ファイル: ImageController.php プロジェクト: rom1git/Centurion
 public function preDispatch()
 {
     parent::preDispatch();
     $this->getHelper('layout')->disableLayout();
     $this->getHelper('viewRenderer')->setNoRender(true);
 }
コード例 #4
0
ファイル: Mptt.php プロジェクト: netconstructor/Centurion
 public function preDispatch()
 {
     parent::preDispatch();
     $this->view->assign(array('controllerName' => $this->getRequest()->getControllerName(), 'actionName' => $this->getRequest()->getActionName(), 'moduleName' => $this->getRequest()->getModuleName(), 'titleColumn' => $this->_titleColumn, 'publishColumn' => $this->_publishColumn, 'publishDateColumn' => $this->_publishDateColumn, 'parentColumn' => Core_Traits_Mptt_Model_DbTable::MPTT_PARENT, 'attribs' => $this->getAttribs()));
 }