function StaticRouteDiscoveryBase::onRouteBuild
Same name and namespace in other branches
- main core/lib/Drupal/Core/Routing/StaticRouteDiscoveryBase.php \Drupal\Core\Routing\StaticRouteDiscoveryBase::onRouteBuild()
Adds routes to the route builder.
Parameters
\Drupal\Core\Routing\RouteBuildEvent $event: The route build event.
File
-
core/
lib/ Drupal/ Core/ Routing/ StaticRouteDiscoveryBase.php, line 92
Class
- StaticRouteDiscoveryBase
- Provides functionality for a class subscribed to RoutingEvents::STATIC.
Namespace
Drupal\Core\RoutingCode
public function onRouteBuild(RouteBuildEvent $event) : void {
foreach ($this->collectRoutes() as $collection) {
$event->getRouteCollection()
->addCollection($collection);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.