コード例 #1
0
 /**
  * Make sure only the active branch is visible
  *
  * @param array $activeBranch Of \Gems_Menu_Menu Abstract items
  * @return \Gems_Menu_MenuAbstract (continuation pattern)
  */
 protected function setBranchVisible(array $activeBranch)
 {
     parent::setBranchVisible($activeBranch);
     $child = end($activeBranch);
     $store = self::_getSessionStore($this->get('label'));
     $contr = $child->get('controller');
     $action = $child->get('action');
     $store->controller = $contr;
     $store->action = $action;
     $this->set('controller', $contr);
     $this->set('action', $action);
     return $this;
 }