class EventGroupRouteSubscriber in Event 8
Listens to the dynamic route events.
Hierarchy
- class \Drupal\Core\Routing\RouteSubscriberBase implements \Symfony\Component\EventDispatcher\EventSubscriberInterface
- class \Drupal\event_group\Routing\EventGroupRouteSubscriber
Expanded class hierarchy of EventGroupRouteSubscriber
1 string reference to 'EventGroupRouteSubscriber'
- event_group.services.yml in modules/
event_group/ event_group.services.yml - modules/event_group/event_group.services.yml
1 service uses EventGroupRouteSubscriber
File
- modules/
event_group/ src/ Routing/ EventGroupRouteSubscriber.php, line 11
Namespace
Drupal\event_group\RoutingView source
class EventGroupRouteSubscriber extends RouteSubscriberBase {
/**
* {@inheritdoc}
*/
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',
));
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EventGroupRouteSubscriber:: |
public | function |
Alters existing routes for a specific collection. Overrides RouteSubscriberBase:: |
|
RouteSubscriberBase:: |
public static | function | Returns an array of event names this subscriber wants to listen to. | 5 |
RouteSubscriberBase:: |
public | function | Delegates the route altering to self::alterRoutes(). | 1 |