コード例 #1
0
ファイル: CmsController.php プロジェクト: konstantin-pr/Ses
 function init()
 {
     parent::init();
     require_once $this->getApplicationPath() . '/application/admin/DB.php';
     //        require_once $this->getApplicationPath() . '/application/Log.php';
     require_once $this->getApplicationPath() . '/application/models/CopyExportImport.php';
     $app = new Stuzo_Application_Core($this->getApplicationPath() . '/application');
     $options = $app->getBootstrap()->getOption('resources');
     $log = new Stuzo_Application_Resource_Log($options['log']);
     Zend_Registry::set('log', $log->getLog());
     Zend_Registry::set('logger', $log->getLog());
     $this->view->app_url = $this->getApplicationUrl();
     $this->view->app_path = $this->getApplicationPath();
     $user = Zend_Registry::get('user');
     $this->view->userIsAdmin = $user['role'] == 'super' ? true : false;
 }
コード例 #2
0
 function init()
 {
     parent::init();
     require_once $this->getApplicationPath() . '/application/admin/DB.php';
     //        require_once $this->getApplicationPath() . '/application/admin/Log.php';
     $app = Stuzo_Application_Core::getInstance($this->getApplicationPath() . '/application');
     $options = $app->getBootstrap()->getOption('resources');
     $log = new Stuzo_Application_Resource_Log($options['log']);
     Zend_Registry::set('log', $log->getLog());
     Zend_Registry::set('logger', $log->getLog());
     require_once $this->getApplicationPath() . '/vendor/autoload.php';
     $this->setNoRender();
     $this->view->config = Zend_Registry::get('config');
     $this->_model = DB::em()->getRepository('Entity\\Feed');
     $this->processFormData();
     $this->preDispatch();
 }