You are here

protected function Router::getInitialRouteCollection in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Routing/Router.php \Drupal\Core\Routing\Router::getInitialRouteCollection()
  2. 10 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.

1 call to Router::getInitialRouteCollection()
Router::matchRequest in core/lib/Drupal/Core/Routing/Router.php
Tries to match a request with a set of routes.

File

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

Class

Router
Router implementation in Drupal.

Namespace

Drupal\Core\Routing

Code

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