Esempio n. 1
0
 /**
  * 获取前台控制菜单列表
  */
 public function menus()
 {
     if ($menus = MenusModel::all()) {
         return Tools::getChild($menus, $pid = 0);
     }
     return [];
 }
Esempio n. 2
0
 /**
  * 数组中对象子id重组
  */
 public static function getChild($arrs, $pid = 0)
 {
     $list = array();
     foreach ($arrs as $v) {
         if ($v->pid == $pid) {
             //找到子节点,继续找该子节点的后代节点
             $v->child = Tools::getChild($arrs, $v->id);
             $list[] = $v;
         }
     }
     return $list;
 }
Esempio n. 3
0
 public static function getFooters()
 {
     return Tools::getChild(LinkModel::footers(), $pid = 0);
 }
Esempio n. 4
0
 public static function getActions()
 {
     return Tools::getChild(ActionModel::getAdminMenus(), $pid = 0);
 }
Esempio n. 5
0
 public static function getHeaders()
 {
     return Tools::getChild(LinkModel::headers(), $pid = 0);
 }
Esempio n. 6
0
 public static function getMemberMenus()
 {
     return Tools::getChild(MenusModel::MemberMenus(), $pid = 0);
 }
 public static function getCompanyMenus()
 {
     return Tools::getChild(MenusModel::CompanyMenus(), $pid = 0);
 }
Esempio n. 8
0
 public static function getNavigates()
 {
     return Tools::getChild(LinkModel::navigates(), $pid = 0);
 }