protected function prepareAdditionalData() { parent::prepareAdditionalData(); if (!empty($this->currentUser['id'])) { if (CoreServices2::getRequest()->getFromGet('logout') == 1) { CoreServices2::getAccess()->logout(); $this->redirectToHomePage(); } } }
protected function addFormValidators() { parent::addFormValidators(); // $this->form->addValidator(new CoreFormValidatorNotEmpty('menuId')); $this->form->addValidator(new CoreFormValidatorNotEmpty('subpageCaption')); $this->form->addValidator(new CoreFormValidatorMaxTextLength('subpageCaption', 32)); $this->form->addValidator(new CoreFormValidatorMaxTextLength('subpageLead', 180)); $this->form->addValidator(new CoreFormValidatorNotEmpty('subpageTitle')); $this->form->addValidator(new CoreFormValidatorMaxTextLength('subpageTitle', 80)); $this->form->addValidator(new CoreFormValidatorMaxTextLength('subpageContent', 10000)); }