Beispiel #1
0
 public function init()
 {
     //set timeout
     $this->_sessionAdmin = new Zend_Session_Namespace(Zend_Auth_Storage_Session::NAMESPACE_DEFAULT);
     $this->_sessionAdmin->setExpirationSeconds(30 * 60);
     //load acl
     $aclLoader = HCMS_Acl_Loader::getInstance();
     $aclLoader->load();
     if (!Zend_Auth::getInstance()->hasIdentity()) {
         $this->_admin = null;
     } else {
         $this->_admin = Zend_Auth::getInstance()->getIdentity();
         $aclLoader->setCurrentRoleCode($aclLoader->getRoleCode($this->_admin->get_role_id()));
     }
     $this->view->admin = $this->_admin;
     if ($this->_checkAuth) {
         $this->_checkAuthorization();
     }
     $this->_redirect_to_ssl();
     $this->_checkIP();
     //set ACL object for Zend_Navigation
     Zend_View_Helper_Navigation_HelperAbstract::setDefaultAcl($aclLoader->getAcl());
     Zend_View_Helper_Navigation_HelperAbstract::setDefaultRole($aclLoader->getCurrentRoleCode());
     $this->_initVersionInfo();
     $this->_module = new Application_Model_Module();
     if (Application_Model_ModuleMapper::getInstance()->findByCode($this->getRequest()->getModuleName(), $this->_module)) {
         $this->view->moduleSettings = $this->_module->get_settings();
     }
     parent::init();
 }
 public function init()
 {
     //cli version
     if (PHP_SAPI != 'cli') {
         parent::init();
     }
 }
Beispiel #3
0
 public function init()
 {
     if ($this->getRequest()->getActionName() == 'index') {
         //for index action meta will go from page not menu
         $this->_isMetaFromActiveMenu = false;
     }
     parent::init();
 }
 public function init()
 {
     parent::init();
     $this->_module = new Application_Model_Module();
     if (Application_Model_ModuleMapper::getInstance()->findByCode($this->getRequest()->getModuleName(), $this->_module)) {
         $this->view->sitemapSettings = $this->_module->get_settings('sitemap');
     }
 }
 public function init()
 {
     $this->_formHelper = $this->getHelper('ajaxForm');
     $this->_module = new Application_Model_Module();
     if (!Application_Model_ModuleMapper::getInstance()->findByCode($this->getRequest()->getModuleName(), $this->_module)) {
         throw new Exception("Contact module not installed");
     }
     parent::init();
     $this->_loadParams();
     if ($this->hasFileUpload()) {
         $this->_genericFileHelper = new HCMS_File_GenericHelper($this->_application, $this->getInvokeArg('bootstrap')->getOption('fileserver'));
         Zend_Registry::set('genericFileHelper', $this->_genericFileHelper);
     }
 }
 protected function _initLayout()
 {
     $this->_helper->layout->disableLayout();
     $this->_helper->viewRenderer->setNoRender();
     parent::_initLayout();
 }