public function getWidgetAdminMenu($route_class, array $options = array())
    {
        $options += array('parent_url' => 'admin');

        $items = array();
        foreach ($route_class->getList() as $path => $route) {
            if (strpos($path, "{$options['parent_url']}/") !== 0 || empty($route['menu']['admin'])) {
                continue;
            }
            if (isset($route['access']) && !$this->access($route['access'])) {
                continue;
            }
            $items[$path] = array(
                'url' => $this->url($path),
                'text' => $this->text($route['menu']['admin']),
                'depth' => substr_count(substr($path, strlen("{$options['parent_url']}/")), '/'),
            );
        }

        ksort($items);
        $options += array('items' => $items);
        return $this->getWidgetMenu($options);
    }
public function getWidgetAdminMenu($route_class, array $options = array())
    {
        $options += array('parent_url' => 'admin');

        $items = array();
        foreach ($route_class->getList() as $path => $route) {
            if (strpos($path, "{$options['parent_url']}/") !== 0 || empty($route['menu']['admin'])) {
                continue;
            }
            if (isset($route['access']) && !$this->access($route['access'])) {
                continue;
            }
            $items[$path] = array(
                'url' => $this->url($path),
                'text' => $this->text($route['menu']['admin']),
                'depth' => substr_count(substr($path, strlen("{$options['parent_url']}/")), '/'),
            );
        }

        ksort($items);
        $options += array('items' => $items);
        return $this->getWidgetMenu($options);
    }
public function getWidgetAdminMenu ( $ route_class , array $ options = array ( ) ) { $ options += array ( 'parent_url' => 'admin' ) ; $ items = array ( ) ; foreach ( $ route_class -> getList ( ) as $ path => $ route ) { if ( strpos ( $ path , "{$options['parent_url']}/" ) !== 0 || empty ( $ route [ 'menu' ] [ 'admin' ] ) ) { continue ; } if ( isset ( $ route [ 'access' ] ) && ! $ this -> access ( $ route [ 'access' ] ) ) { continue ; } $ items [ $ path ] = array ( 'url' => $ this -> url ( $ path ) , 'text' => $ this -> text ( $ route [ 'menu' ] [ 'admin' ] ) , 'depth' => substr_count ( substr ( $ path , strlen ( "{$options['parent_url']}/" ) ) , '/' ) , ) ; } ksort ( $ items ) ; $ options += array ( 'items' => $ items ) ; return $ this -> getWidgetMenu ( $ options ) ; }
Returns rendered admin menu
@param \gplcart\core\Route $route_class
@param array $options
@return string
Returns rendered admin menu