Ejemplo n.º 1
0
 /**
  * walks menu tree and clears all previously selected entries
  *
  * @param Menu $menu
  */
 protected function clearSelectedMenuEntries(Menu $menu)
 {
     while ($e = $menu->getSelectedEntry()) {
         // dynamic menus come either with unselected entry or have a selected entry explicitly set
         if ($menu->getType() == 'static') {
             $menu->clearSelectedEntry();
         }
         if (!($menu = $e->getSubMenu())) {
             break;
         }
     }
 }
Ejemplo n.º 2
0
 public function __destruct()
 {
     if ($this->subMenu && $this->subMenu->getType() == 'dynamic') {
         $this->subMenu->__destruct();
     }
 }