public function RouteProvider::preLoadRoutes in Drupal 9
Same name in this branch
- 9 core/tests/Drupal/KernelTests/RouteProvider.php \Drupal\KernelTests\RouteProvider::preLoadRoutes()
- 9 core/lib/Drupal/Core/Routing/RouteProvider.php \Drupal\Core\Routing\RouteProvider::preLoadRoutes()
Same name and namespace in other branches
- 8 core/tests/Drupal/KernelTests/RouteProvider.php \Drupal\KernelTests\RouteProvider::preLoadRoutes()
Pre-load routes by their names using the provided list of names.
This method exists in order to allow performance optimizations. It allows pre-loading serialized routes that may latter be retrieved using ::getRoutesByName()
Parameters
string[] $names: Array of route names to load.
Overrides PreloadableRouteProviderInterface::preLoadRoutes
File
- core/
tests/ Drupal/ KernelTests/ RouteProvider.php, line 48
Class
- RouteProvider
- Rebuilds the router when the provider is instantiated.
Namespace
Drupal\KernelTestsCode
public function preLoadRoutes($names) {
return $this
->lazyLoadItself()
->preLoadRoutes($names);
}