public function MockRouteProvider::getAllRoutes in Drupal 9
Same name and namespace in other branches
- 8 core/modules/system/src/Tests/Routing/MockRouteProvider.php \Drupal\system\Tests\Routing\MockRouteProvider::getAllRoutes()
- 10 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 83
Class
- MockRouteProvider
- Easily configurable mock route provider.
Namespace
Drupal\system\Tests\RoutingCode
public function getAllRoutes() {
return $this->routes
->all();
}