public function preDispatch() { $this->_helper->authCheck(); $this->_helper->aclCheck(); $this->_helper->layout->setLayout('admin'); parent::preDispatch(); }
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; } } }
/** * @todo : description * * @return void */ public function init() { //@TODo Why 2 call to direct() ? $this->getHelper('ContextAutoSwitch')->direct(array('index', 'list')); $this->getHelper('ContextAutoSwitch')->direct(); //@TODO: why call to setParams. Params should already have been populated by frontController $this->_request->setParams($this->getHelper('params')->direct()); parent::init(); }
public function init() { $this->_helper->authCheck(); $this->_helper->aclCheck(); parent::init(); }
/** * * @return Zend_Cache_Core */ protected function _getCache() { if (null === self::$_cache) { self::$_cache = $this->getInvokeArg('bootstrap')->getResource('cachemanager')->getCache('core'); } return self::$_cache; }
public function init() { $this->getHelper('ContextAutoSwitch')->direct(array('index', 'list')); $this->getHelper('ContextAutoSwitch')->direct(); $this->_request->setParams($this->getHelper('params')->direct()); parent::init(); }
public function preDispatch() { parent::preDispatch(); $this->getHelper('layout')->disableLayout(); $this->getHelper('viewRenderer')->setNoRender(true); }
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())); }