You are here

class EventGroupRouteSubscriber in Event 8

Listens to the dynamic route events.

Hierarchy

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
event_group.route_subscriber in modules/event_group/event_group.services.yml
Drupal\event_group\Routing\EventGroupRouteSubscriber

File

modules/event_group/src/Routing/EventGroupRouteSubscriber.php, line 11

Namespace

Drupal\event_group\Routing
View 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

Namesort descending Modifiers Type Description Overrides
EventGroupRouteSubscriber::alterRoutes public function Alters existing routes for a specific collection. Overrides RouteSubscriberBase::alterRoutes
RouteSubscriberBase::getSubscribedEvents public static function Returns an array of event names this subscriber wants to listen to. 5
RouteSubscriberBase::onAlterRoutes public function Delegates the route altering to self::alterRoutes(). 1