Пример #1
0
 public function onBootstrap(MvcEvent $e)
 {
     $eventManager = $e->getApplication()->getEventManager();
     $moduleRouteListener = new ModuleRouteListener();
     $moduleRouteListener->attach($eventManager);
     $serviceManager = $e->getApplication()->getServiceManager();
     $MenuModel = new Model\MenuModel($serviceManager);
     $MenuModel->setSm($serviceManager);
     Model\MenuModel::addMenu('Navigation');
     Model\MenuModel::addMenu('Admin');
 }
 /**
  * 取系统菜单列表,用于显示在上级菜单的OPTION
  * @return ARRAY 包括有所有菜单信息的二级数组
  * author:panjie 3792535@qq.com
  */
 private function _fetchMenuList()
 {
     $menuModel = new MenuModel();
     $data = $menuModel->getMenuTree(null, null, 0, 2);
     return tree_to_list($data, 0, '_son');
 }