コード例 #1
0
 /**
  * 添加/编辑菜单
  */
 public function menuAction()
 {
     $menuId = $this->g('id');
     if (empty($menuId)) {
         $this->assign('title', $GLOBALS['_LANG']['COMMON']['ADD']);
         $this->routeMethod('POST');
     } else {
         if (!($content = \Model\Menu::findMenu($menuId))) {
             $this->error($GLOBALS['_LANG']['MENU']['NOT_EXITS_MENU']);
         }
         $this->assign($content);
         $this->assign('title', $GLOBALS['_LANG']['COMMON']['EDIT']);
         $this->routeMethod('PUT');
     }
     $this->assign('topMenu', \Model\Menu::topMenu());
     $this->assign('menu_id', $menuId);
     $this->assign('url', $this->url('Team-Index-menuAction'));
     $this->layout();
 }
コード例 #2
0
ファイル: Index.class.php プロジェクト: hurricanetx/PESCMS2
 /**
  * 添加/编辑菜单
  */
 public function menuAction()
 {
     $menuId = $this->g('id');
     if (empty($menuId)) {
         $this->assign('title', '添加菜单');
         $this->routeMethod('POST');
     } else {
         if (!($content = \Model\Menu::findMenu($menuId))) {
             $this->error('不存在的菜单');
         }
         $this->assign($content);
         $this->assign('title', '编辑菜单');
         $this->routeMethod('PUT');
     }
     $this->assign('topMenu', \Model\Menu::topMenu());
     $this->assign('menu_id', $menuId);
     $this->assign('url', $this->url(GROUP . '-Index-menuAction'));
     $this->layout();
 }
コード例 #3
0
ファイル: Menu.class.php プロジェクト: Myazure/PESCMS2
 public function action()
 {
     $this->assign('topMenu', json_encode(\Model\Menu::topMenu()));
     parent::action();
 }