public function listSideMenuItems($owner = null, $code = null)
    {
        $activeItem = null;

        if ($owner !== null && $code !== null) {
            $activeItem = @$this->items[$this->makeItemKey($owner, $code)];
        } else {
            foreach ($this->listMainMenuItems() as $item) {
                if ($this->isMainMenuItemActive($item)) {
                    $activeItem = $item;
                    break;
                }
            }
        }

        if (!$activeItem) {
            return [];
        }

        $items = $activeItem->sideMenu;

        foreach ($items as $item) {
            if ($item->counter !== null && is_callable($item->counter)) {
                $item->counter = call_user_func($item->counter, $item);
            }
        }

        return $items;
    }
public function listSideMenuItems($owner = null, $code = null)
    {
        $activeItem = null;

        if ($owner !== null && $code !== null) {
            $activeItem = @$this->items[$this->makeItemKey($owner, $code)];
        } else {
            foreach ($this->listMainMenuItems() as $item) {
                if ($this->isMainMenuItemActive($item)) {
                    $activeItem = $item;
                    break;
                }
            }
        }

        if (!$activeItem) {
            return [];
        }

        $items = $activeItem->sideMenu;

        foreach ($items as $item) {
            if ($item->counter !== null && is_callable($item->counter)) {
                $item->counter = call_user_func($item->counter, $item);
            }
        }

        return $items;
    }
public function listSideMenuItems ( $ owner = null , $ code = null ) { $ activeItem = null ; if ( $ owner !== null && $ code !== null ) { $ activeItem = @ $ this -> items [ $ this -> makeItemKey ( $ owner , $ code ) ] ; } else { foreach ( $ this -> listMainMenuItems ( ) as $ item ) { if ( $ this -> isMainMenuItemActive ( $ item ) ) { $ activeItem = $ item ; break ; } } } if ( ! $ activeItem ) { return [ ] ; } $ items = $ activeItem -> sideMenu ; foreach ( $ items as $ item ) { if ( $ item -> counter !== null && is_callable ( $ item -> counter ) ) { $ item -> counter = call_user_func ( $ item -> counter , $ item ) ; } } return $ items ; }
Returns a list of side menu items for the currently active main menu item.
The currently active main menu item is set with the setContext methods.
Returns a list of side menu items for the currently active main menu item . The currently active main menu item is set with the setContext methods .