function RoutePreloader::__construct

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Routing/RoutePreloader.php \Drupal\Core\Routing\RoutePreloader::__construct()
  2. 10 core/lib/Drupal/Core/Routing/RoutePreloader.php \Drupal\Core\Routing\RoutePreloader::__construct()
  3. 11.x core/lib/Drupal/Core/Routing/RoutePreloader.php \Drupal\Core\Routing\RoutePreloader::__construct()

Constructs a new RoutePreloader.

Parameters

\Drupal\Core\Routing\RouteProviderInterface $route_provider: The route provider.

\Drupal\Core\State\StateInterface $state: The state key value store.

\Drupal\Core\Cache\CacheBackendInterface $cache: The cache backend.

File

core/lib/Drupal/Core/Routing/RoutePreloader.php, line 60

Class

RoutePreloader
Defines a class which preloads non-admin routes.

Namespace

Drupal\Core\Routing

Code

public function __construct(RouteProviderInterface $route_provider, StateInterface $state, CacheBackendInterface $cache) {
    $this->routeProvider = $route_provider;
    $this->state = $state;
    $this->cache = $cache;
}

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