You are here

public function RouteProviderLazyBuilder::getAllRoutes in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Routing/RouteProviderLazyBuilder.php \Drupal\Core\Routing\RouteProviderLazyBuilder::getAllRoutes()

Returns all the routes on the system.

Usage of this method is discouraged for performance reasons. If possible, use RouteProviderInterface::getRoutesByNames() or RouteProviderInterface::getRoutesByPattern() instead.

Return value

\Symfony\Component\Routing\Route[] An iterator of routes keyed by route name.

Overrides RouteProviderInterface::getAllRoutes

File

core/lib/Drupal/Core/Routing/RouteProviderLazyBuilder.php, line 110

Class

RouteProviderLazyBuilder
A Route Provider front-end for all Drupal-stored routes.

Namespace

Drupal\Core\Routing

Code

public function getAllRoutes() {
  return $this
    ->getRouteProvider()
    ->getAllRoutes();
}