private function menuHelper($item)
    {
        // recurse into submenus
        if (isset($item['submenu']) && is_array($item['submenu'])) {
            $item['submenu'] = $this->menuHelper($item['submenu']);
        }

        if (isset($item['route'])) {
            $item['link'] = $this->resolveRouteToLink($item);
        } elseif (isset($item['path'])) {
            $item = $this->resolvePathToContent($item);
        }

        return $item;
    }
private function menuHelper($item)
    {
        // recurse into submenus
        if (isset($item['submenu']) && is_array($item['submenu'])) {
            $item['submenu'] = $this->menuHelper($item['submenu']);
        }

        if (isset($item['route'])) {
            $item['link'] = $this->resolveRouteToLink($item);
        } elseif (isset($item['path'])) {
            $item = $this->resolvePathToContent($item);
        }

        return $item;
    }
private function menuHelper ( $ item ) { // recurse into submenus if ( isset ( $ item [ 'submenu' ] ) && is_array ( $ item [ 'submenu' ] ) ) { $ item [ 'submenu' ] = $ this -> menuHelper ( $ item [ 'submenu' ] ) ; } if ( isset ( $ item [ 'route' ] ) ) { $ item [ 'link' ] = $ this -> resolveRouteToLink ( $ item ) ; } elseif ( isset ( $ item [ 'path' ] ) ) { $ item = $ this -> resolvePathToContent ( $ item ) ; } return $ item ; }
Updates a menu item to have at least a 'link' key.

@param array $item

@return array Keys 'link' and possibly 'label', 'title' and 'path'
Updates a menu item to have at least a link key .