Пример #1
0
 public function __construct()
 {
     parent::__construct();
     $this->auth = Auth::getInstance();
     $this->session = \Uno\Session::getInstance();
     $this->template->user = $this->auth;
 }
Пример #2
0
 public function __construct()
 {
     parent::__construct();
     $this->auth = Auth::getInstance();
     if (!$this->auth->hasIdentity()) {
         $this->redirect('/');
     }
     $this->session = \Uno\Session::getInstance();
     $current = \URI::getInstance()->segment(2);
     $this->template->header = new \View('header');
     $topmenu = array(array('name' => _('Dashboard'), 'link' => '/admin', 'active' => '' == $current), array('name' => _('Menus'), 'link' => '/admin/menus', 'active' => 'menus' == $current), array('name' => _('Layouts'), 'link' => '', 'active' => 'layouts' == $current), array('name' => _('Widgets'), 'link' => '', 'active' => 'widgets' == $current), array('name' => _('Modules'), 'link' => '/admin/modules', 'active' => strpos($current, 'module') !== FALSE));
     $this->template->header->topmenu = $topmenu;
     $this->template->jscript('/admin/index/resource/admin.js');
 }