public function RouterBase::addRoute in Drupal 7 to 8/9 Module Upgrader 8
Adds a wrapped route definition to this router.
Parameters
RouteWrapperInterface $route: The wrapped route definition.
Overrides RouterInterface::addRoute
File
- src/
Routing/ RouterBase.php, line 29
Class
- RouterBase
- Base class for RouterInterface implementations.
Namespace
Drupal\drupalmoduleupgrader\RoutingCode
public function addRoute(RouteWrapperInterface $route) {
$this
->set($route
->getIdentifier(), $route);
$this->dispatcher
->addListener('router.built', [
$route,
'onRouterBuilt',
]);
}