You are here

public function Router::addRouteEnhancer in Drupal 9

Same name and namespace in other branches
  1. 8 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 93

Class

Router
Router implementation in Drupal.

Namespace

Drupal\Core\Routing

Code

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