示例#1
0
 function initView($view)
 {
     $view->auth_login_model = Zend_Registry::get('login_model');
     $view->auth_logout_model = Zend_Registry::get('logout_model');
     $acl = Zend_Registry::get('acl');
     $user = Zend_Registry::get('user');
     try {
         $sudoer = Zend_Registry::get('sudoer');
         $this->append('Redevenir ' . $sudoer->username, array('controller' => 'membres', 'action' => 'unsudo'));
     } catch (Zend_Exception $e) {
     }
     parent::initView($view);
 }
示例#2
0
文件: Menu.php 项目: bersace/strass
 public function initView($view)
 {
     foreach (self::$menu as $item) {
         $acl = array_key_exists('acl', $item) ? $item['acl'] : array();
         $this->append($item['metas'], $item['url'], $acl, true);
     }
     $t = new Unites();
     $racines = $t->findRacines();
     foreach ($racines as $i => $u) {
         if (!$i) {
             continue;
         }
         // On saute l'unité racine par défaut
         $this->append($u->getFullName(), array('unite' => $u->slug), array(), true);
     }
     parent::initView($view);
     $view->parent = $view->document->footer->current();
 }
示例#3
0
 function initView($view)
 {
     parent::initView($view);
     $view->parent = $view->document->header;
 }