/** * Initialize controller. */ public function init() { parent::init(); $this->_facetMenu = new Solrsearch_Model_FacetMenu(); $this->_helper->mainMenu('search'); // activate entry in main menu }
public function init() { parent::init(); $client = PR_Session::getSession(PR_Session::SESSION_USER); if (empty($client)) { $this->_helper->redirector("index", "login"); } }
/** * Custom access check to be called by parent class. Returns the value of * config key "account.editOwnAccount" if set; false otherwise. * * @return boolean */ protected function customAccessCheck() { $parentValue = parent::customAccessCheck(); $config = $this->getConfig(); if (!isset($config) or !isset($config->account->editOwnAccount)) { return false; } return $parentValue and $config->account->editOwnAccount; }
public function init() { parent::init(); // $client = PR_Session::getSession(PR_Session::SESSION_CLIENT); $user = PR_Session::getSession(PR_Session::SESSION_USER); //echo("user");print_r($user); if (empty($user)) { $this->_helper->redirector("index", "login"); } }
/** * Setup module. Check privileges. */ public function init() { parent::init(); // Highlight menu entries. if (true === Opus_Security_Realm::getInstance()->checkModule('admin')) { $this->getHelper('MainMenu')->setActive('admin'); } else { $this->getHelper('MainMenu')->setActive('review'); } $this->_loggedUser = new Publish_Model_LoggedUser(); $this->view->title = $this->view->translate('review_index_title'); }
/** * Initializes controller. */ public function init() { parent::init(); $this->_documentsHelper = $this->_helper->getHelper('Documents'); $this->_workflowHelper = $this->_helper->getHelper('Workflow'); $config = $this->getConfig(); if (isset($config->confirmation->document->statechange->enabled)) { $this->_confirmChanges = $config->confirmation->document->statechange->enabled == 1 ? true : false; } else { $this->_confirmChanges = true; } }
public function init() { parent::init(); $user = CS_Session::getSession(); if ($this->view->ajax == 1 && empty($user)) { $this->_helper->json(array('logined' => 0)); } else { if (empty($user)) { $this->_helper->redirector("index", "login"); } } }
public function init() { parent::init(); $client = PR_Session::getSession(PR_Session::SESSION_USER); if ($this->view->ajax == 1 && empty($client)) { $this->_helper->json(array('logined' => 0)); } else { if (empty($client)) { // $this->_helper->redirector("index", "login"); $this->_helper->redirector("index", "star"); } } }
public function init() { parent::init(); $this->_model = new Admin_Model_IndexMaintenance($this->getLogger()); // TODO features will be enabled in later version $this->view->disabledFeatureFulltextExtractionCheck = true; // TODO OPUSVIER-2955 $this->view->disabledFeatureIndexOptimization = true; // TODO OPUSVIER-2956 if ($this->_model->getFeatureDisabled()) { $this->view->featureDisabled = true; } else { $this->view->allowConsistencyCheck = $this->_model->allowConsistencyCheck(); $this->view->allowFulltextExtractionCheck = $this->_model->allowFulltextExtractionCheck(); $this->view->allowIndexOptimization = $this->_model->allowIndexOptimization(); } }
public function init() { parent::init(); $config = $this->getConfig(); if (isset($config->admin->documents->linkToAuthorSearch)) { $this->view->linkToAuthorSearch = $config->admin->documents->linkToAuthorSearch; } else { $this->view->linkToAuthorSearch = 0; } if (isset($config->admin->documents->maxDocsDefault)) { $this->_maxDocsDefault = $config->admin->documents->maxDocsDefault; } else { $this->_maxDocsDefault = 10; } if (isset($config->admin->documents->defaultview)) { $default = $config->admin->documents->defaultview; if (!in_array($default, $this->_docOptions)) { $this->getLogger()->err("Option 'admin.documents.defaultview' hat ungegueltigen Wert '{$default}'."); } $this->_stateOptionDefault = $default; } }
/** * The home module is the place for all custom static pages. This function * catches all action calls, thus making a new page available via * http://.../home/index/page by simply placing it in * modules/home/views/scripts/index/page.phtml * * @param string $action The name of the action that was called. * @param array $parameters The parameters passed to the action. * @return void */ public function __call($action, $parameters) { if (!'Action' == substr($action, -6)) { $this->getLogger()->info(__METHOD__ . ' undefined method: ' . $action); parent::__call($action, $parameters); } // it should be checked if the requested static page exists at all, as // otherwise this controller will not throw exceptions of type NO_ACTION $actionName = $this->getRequest()->getActionName(); $phtmlFilesAvailable = $this->getViewScripts(); if (array_search($actionName, $phtmlFilesAvailable) === FALSE) { $this->getLogger()->info(__METHOD__ . ' requested file ' . $actionName . '.phtml is not readable or does not exist'); parent::__call($action, $parameters); } $translation = $this->view->translate('help_content_' . $actionName); $helpFilesAvailable = Home_Model_HelpFiles::getFiles(); $pos = array_search($translation, $helpFilesAvailable); if ($pos === FALSE) { $this->view->text = $translation; } else { $this->view->text = Home_Model_HelpFiles::getFileContent($helpFilesAvailable[$pos]); } }
public function __construct(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs = array()) { $this->log = $this->getLogger(); $this->session = new Zend_Session_Namespace('Publish'); parent::__construct($request, $response, $invokeArgs); }
/** * Initializes controller. */ public function init() { parent::init(); $this->_documentsHelper = $this->_helper->getHelper('Documents'); }
public function init() { parent::init(); $this->_statisticsModel = new Admin_Model_Statistics(); }
public function init() { parent::init(); //$this->_helper->_layout->setLayout('login'); }
/** * Initialisiert den Controller. */ public function init() { parent::init(); $this->loadDefaultMessages(); }
/** * Initializes common controller variables. */ public function init() { parent::init(); $this->_exportHelper = new CitationExport_Model_Helper($this->view->fullUrl(), $this->view->getScriptPath('index')); $this->view->title = $this->view->translate('citationExport_modulename'); }
public function init() { parent::init(); $this->getHelper('MainMenu')->setActive('publish'); }
public function init() { parent::init(); $this->_documentTypesHelper = Zend_Controller_Action_HelperBroker::getStaticHelper('DocumentTypes'); }
public function init() { parent::init(); $this->_helper->mainMenu('browsing'); $this->seriesUtil = new Solrsearch_Model_SeriesUtil(); }
/** * Setup theme path * * @return void */ public function init() { parent::init(); }
public function init() { $this->session = new Zend_Session_Namespace('Publish'); parent::init(); }