original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: Returns rendered admin menu
  @param \gplcart\core\Route $route_class
  @param array $options
  @return string
docstring_tokens: Returns rendered admin menu