Exemplo n.º 1
0
 protected function startup()
 {
     parent::startup();
     if ($this->session->hasSection('cms_localization')) {
         $localizationSection = $this->session->getSection('cms_localization');
         if ($localizationSection->locale !== null) {
             $this->locale = $localizationSection->locale;
         }
     }
 }
Exemplo n.º 2
0
 protected function startup()
 {
     parent::startup();
     if (!$this->user->isLoggedIn()) {
         $this->flashMessage('admin.signIn', 'warning');
         $this->redirect(':Users:Front:Auth:login');
     }
     if ($this->session->hasSection('cms_localization')) {
         $localizationSection = $this->session->getSection('cms_localization');
         if ($localizationSection->locale !== null) {
             $this->locale = $localizationSection->locale;
         }
     }
 }