function Router::addRouteEnhancer

Same name in other branches
  1. 9 core/lib/Drupal/Core/Routing/Router.php \Drupal\Core\Routing\Router::addRouteEnhancer()
  2. 8.9.x core/lib/Drupal/Core/Routing/Router.php \Drupal\Core\Routing\Router::addRouteEnhancer()
  3. 11.x core/lib/Drupal/Core/Routing/Router.php \Drupal\Core\Routing\Router::addRouteEnhancer()

Adds a route enhancer.

Parameters

\Drupal\Core\Routing\EnhancerInterface $route_enhancer: The route enhancer.

File

core/lib/Drupal/Core/Routing/Router.php, line 109

Class

Router
Router implementation in Drupal.

Namespace

Drupal\Core\Routing

Code

public function addRouteEnhancer(EnhancerInterface $route_enhancer) {
    $this->enhancers[] = $route_enhancer;
}

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