Esempio n. 1
0
 public function display(UI $aUI, IHashTable $aVariables = null, IOutputStream $aDevice = null)
 {
     if (($depth = $this->attribute('depth')) !== null) {
         if ($aMenu = $this->findActiveSubMenu((int) $depth)) {
             $aMenu->display($aUI, $aVariables, $aDevice);
         }
     } else {
         if (($xpath = $this->attribute('xpath')) !== null) {
             if ($aMenu = $this->getMenuByPath($xpath)) {
                 $aMenu->display($aUI, $aVariables, $aDevice);
             }
         } else {
             if ($this->showDepths() != 0 || $this->isRenderAll()) {
                 parent::display($aUI, $aVariables, $aDevice);
             }
         }
     }
 }
Esempio n. 2
0
 public function view()
 {
     if ($aView = parent::view()) {
         return $aView;
     }
     if ($aMenu = $this->parentMenu()) {
         return $aMenu->view();
     }
     return null;
 }