You are here

protected function LazyRouteEnhancer::getEnhancers in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Routing/LazyRouteEnhancer.php \Drupal\Core\Routing\LazyRouteEnhancer::getEnhancers()

For each route, gets a list of applicable enhancer to the route.

Return value

\Symfony\Cmf\Component\Routing\Enhancer\RouteEnhancerInterface[]|\Drupal\Core\Routing\Enhancer\RouteEnhancerInterface[]

1 call to LazyRouteEnhancer::getEnhancers()
LazyRouteEnhancer::setEnhancers in core/lib/Drupal/Core/Routing/LazyRouteEnhancer.php
For each route, saves a list of applicable enhancers to the route.

File

core/lib/Drupal/Core/Routing/LazyRouteEnhancer.php, line 79
Contains \Drupal\Core\Routing\LazyRouteEnhancer.

Class

LazyRouteEnhancer
A route enhancer which lazily loads route enhancers, depending on the route.

Namespace

Drupal\Core\Routing

Code

protected function getEnhancers() {
  if (!isset($this->enhancers)) {
    foreach ($this->serviceIds as $service_id) {
      $this->enhancers[$service_id] = $this->container
        ->get($service_id);
    }
  }
  return $this->enhancers;
}