Example #1
0
 function settings()
 {
     $return = parent::settings();
     if ($this->getParam('type') == 'set') {
         //save settings
         require_once $this->getApplicationPath() . '/application/DB.php';
         require_once $this->getApplicationPath() . '/application/models/CopyExportImport.php';
         $generator = \Application\models\CopyGenerator::factory();
         $generator->generate();
     }
     return $return;
 }
Example #2
0
 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;
 }
 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();
 }