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
1 2 3 4 5 6 7 8 9 10 | 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.