public function getRoutesByNames($names, $parameters = []) { $collection = $this->repository->matching(new Criteria()); $routes = []; $collection->map(function (RouteInterface $route) use(&$routes) { $routes[] = $this->getRouteByName($route->getId()); }); return $routes; }