routeCollection = $router->getRouteCollection(); } public function getRoutesFor($menuId, array $parameters = array()) { $routes = array(); foreach ($this->routeCollection->all() as $key => $route) { if ($route->getOption('menu') === $menuId) { $a['route'] = $key; $a['label'] = $route->getOption('label'); $routes[$route->getOption('order')] = $a; } } ksort($routes); return $routes; } }