You are here

public function RouteProviderLazyBuilder::preLoadRoutes in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Routing/RouteProviderLazyBuilder.php \Drupal\Core\Routing\RouteProviderLazyBuilder::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/lib/Drupal/Core/Routing/RouteProviderLazyBuilder.php, line 89

Class

RouteProviderLazyBuilder
A Route Provider front-end for all Drupal-stored routes.

Namespace

Drupal\Core\Routing

Code

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