Ejemplo n.º 1
0
 /**
  * @param SysModule $module
  * @return Zend_Navigation_Page
  */
 private function createPage(SysModule $module)
 {
     $resourceId = $module->getId();
     if ($module->isMvcPage()) {
         $page = new Zend_Navigation_Page_Mvc();
         $page->setLabel($module->getName());
         $page->setOptions(array('icon' => $module->getIcon(), 'title' => $module->getTitle(), 'subtitle' => $module->getSubTitle(), 'inMenu' => $module->getInMenu()));
         $page->setModule($module->getModule());
         $page->setController($module->getController());
         $page->setAction($module->getAction());
         //$page->setClass('ui-state-default ui-corner-top');
     } else {
         $page = new Zend_Navigation_Page_Uri();
         $page->setOptions(array('icon' => $module->getIcon(), 'title' => $module->getTitle(), 'subtitle' => $module->getSubTitle(), 'inMenu' => $module->getInMenu()));
         $page->setLabel($module->getName());
         $page->setActive(false);
         //$page->setClass('ui-state-default ui-corner-top');
         $page->setUri('javascript:void(0);');
     }
     if ($resourceId) {
         $page->setResource((string) $resourceId);
     }
     return $page;
 }