public function RouteProvider::preLoadRoutes in Drupal 8
Same name in this branch
- 8 core/tests/Drupal/KernelTests/RouteProvider.php \Drupal\KernelTests\RouteProvider::preLoadRoutes()
- 8 core/lib/Drupal/Core/Routing/RouteProvider.php \Drupal\Core\Routing\RouteProvider::preLoadRoutes()
Same name and namespace in other branches
- 9 core/tests/Drupal/KernelTests/RouteProvider.php \Drupal\KernelTests\RouteProvider::preLoadRoutes()
- 10 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 49
Class
- RouteProvider
- Rebuilds the router when the provider is instantiated.
Namespace
Drupal\KernelTestsCode
public function preLoadRoutes($names) {
return $this
->lazyLoadItself()
->preLoadRoutes($names);
}