You are here

public function MockRouteProvider::getAllRoutes in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Routing/MockRouteProvider.php \Drupal\system\Tests\Routing\MockRouteProvider::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/modules/system/src/Tests/Routing/MockRouteProvider.php, line 88
Contains \Drupal\system\Tests\Routing\MockRouteProvider.

Class

MockRouteProvider
Easily configurable mock route provider.

Namespace

Drupal\system\Tests\Routing

Code

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