public function RouteSubscriberBase::onAlterRoutes in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Routing/RouteSubscriberBase.php \Drupal\Core\Routing\RouteSubscriberBase::onAlterRoutes()
- 9 core/lib/Drupal/Core/Routing/RouteSubscriberBase.php \Drupal\Core\Routing\RouteSubscriberBase::onAlterRoutes()
Delegates the route altering to self::alterRoutes().
Parameters
\Drupal\Core\Routing\RouteBuildEvent $event: The route build event.
File
- core/
lib/ Drupal/ Core/ Routing/ RouteSubscriberBase.php, line 35
Class
- RouteSubscriberBase
- Provides a base implementation for RouteSubscriber.
Namespace
Drupal\Core\RoutingCode
public function onAlterRoutes(RouteBuildEvent $event) {
$collection = $event
->getRouteCollection();
$this
->alterRoutes($collection);
}