application/core/manage/logic/MenuLogic.php
public function getCurrentMenu($menu_flag = null)
    {
        // 当前菜单
        $current_menu = $this->getMenuByFlag($menu_flag);
        if (empty($current_menu)) {
            return null;
        }
        
        // 上级菜单
        $parent_menu = $this->model->get($current_menu['menu_pid']);
        if ($parent_menu['menu_pid'] > 0) {
            return $this->getCurrentMenu($parent_menu['menu_flag']);
        } else {
            return $current_menu;
        }
    }
public function getCurrentMenu($menu_flag = null)
    {
        // 当前菜单
        $current_menu = $this->getMenuByFlag($menu_flag);
        if (empty($current_menu)) {
            return null;
        }
        
        // 上级菜单
        $parent_menu = $this->model->get($current_menu['menu_pid']);
        if ($parent_menu['menu_pid'] > 0) {
            return $this->getCurrentMenu($parent_menu['menu_flag']);
        } else {
            return $current_menu;
        }
    }
public function getCurrentMenu ( $ menu_flag = null ) { // 当前菜单 $ current_menu = $ this -> getMenuByFlag ( $ menu_flag ) ; if ( empty ( $ current_menu ) ) { return null ; } // 上级菜单 $ parent_menu = $ this -> model -> get ( $ current_menu [ 'menu_pid' ] ) ; if ( $ parent_menu [ 'menu_pid' ] > 0 ) { return $ this -> getCurrentMenu ( $ parent_menu [ 'menu_flag' ] ) ; } else { return $ current_menu ; } }
当前菜单

@param string $menu_flag
@return array
当前菜单