public function EventGroupRouteSubscriber::alterRoutes in Event 8
Alters existing routes for a specific collection.
Parameters
\Symfony\Component\Routing\RouteCollection $collection: The route collection for adding routes.
Overrides RouteSubscriberBase::alterRoutes
File
- modules/
event_group/ src/ Routing/ EventGroupRouteSubscriber.php, line 16
Class
- EventGroupRouteSubscriber
- Listens to the dynamic route events.
Namespace
Drupal\event_group\RoutingCode
public function alterRoutes(RouteCollection $collection) {
// Replace "some.route.name" below with the actual route you want to override.
if ($route = $collection
->get('entity.group_type.content_plugins')) {
$route
->setDefaults(array(
'_controller' => '\\Drupal\\event_group\\Controller\\EventGroupTypeController::content',
));
}
}