protected RouteSubscriber::alterRoutes(RouteCollection $collection)
Alters existing routes for a specific collection.
Parameters
\Symfony\Component\Routing\RouteCollection $collection: The route collection for adding routes.
Overrides RouteSubscriberBase::alterRoutes
File
- core/modules/config_translation/src/Routing/RouteSubscriber.php, line 35
Class
- RouteSubscriber
- Listens to the dynamic route events.
Namespace
Drupal\config_translation\Routing
Code
protected function alterRoutes(RouteCollection $collection) { $mappers = $this->mapperManager->getMappers($collection); foreach ($mappers as $mapper) { $collection->add($mapper->getOverviewRouteName(), $mapper->getOverviewRoute()); $collection->add($mapper->getAddRouteName(), $mapper->getAddRoute()); $collection->add($mapper->getEditRouteName(), $mapper->getEditRoute()); $collection->add($mapper->getDeleteRouteName(), $mapper->getDeleteRoute()); } }
Please login to continue.