You are here

protected function Router::getInitialRouteCollection in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Routing/Router.php \Drupal\Core\Routing\Router::getInitialRouteCollection()
  2. 9 core/lib/Drupal/Core/Routing/Router.php \Drupal\Core\Routing\Router::getInitialRouteCollection()

Returns a collection of potential matching routes for a request.

Parameters

\Symfony\Component\HttpFoundation\Request $request: The current request.

Return value

\Symfony\Component\Routing\RouteCollection The initial fetched route collection.

File

core/lib/Drupal/Core/Routing/Router.php, line 219

Class

Router
Router implementation in Drupal.

Namespace

Drupal\Core\Routing

Code

protected function getInitialRouteCollection(Request $request) {
  return $this->routeProvider
    ->getRouteCollectionForRequest($request);
}