function Router::getInitialRouteCollection

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

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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.