public function RouteEnhancerSubscriber::onRouteAlter in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/EventSubscriber/RouteEnhancerSubscriber.php \Drupal\Core\EventSubscriber\RouteEnhancerSubscriber::onRouteAlter()
Adds the route_enhancer object to the route collection.
Parameters
\Drupal\Core\Routing\RouteBuildEvent $event: The route build event.
File
- core/
lib/ Drupal/ Core/ EventSubscriber/ RouteEnhancerSubscriber.php, line 41 - Contains \Drupal\Core\EventSubscriber\RouteEnhancerSubscriber.
Class
- RouteEnhancerSubscriber
- Listens to the new routes before they get saved.
Namespace
Drupal\Core\EventSubscriberCode
public function onRouteAlter(RouteBuildEvent $event) {
$this->routeEnhancer
->setEnhancers($event
->getRouteCollection());
}