function 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 53

Class

RouteProvider
Rebuilds the router when the provider is instantiated.

Namespace

Drupal\KernelTests

Code

public function preLoadRoutes($names) {
  return $this->lazyLoadItself()
    ->preLoadRoutes($names);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.