You are here

public static function RouteSubscriber::getSubscribedEvents in Organic groups 8

Overrides \Drupal\Core\Routing\RouteSubscriberBase::getSubscribedEvents.

See the event weight so it will be executed before other alters, such as \Drupal\Core\EventSubscriber\ModuleRouteSubscriber::alterRoutes which is responsible for removing routes that their dependent module is not enabled.

We have such a case with the "members" OG admin route, that requires Views module to be enabled.

Overrides RouteSubscriberBase::getSubscribedEvents

File

src/Routing/RouteSubscriber.php, line 165

Class

RouteSubscriber
Route subscriber for OG related routes.

Namespace

Drupal\og\Routing

Code

public static function getSubscribedEvents() {
  $events[RoutingEvents::ALTER] = [
    'onAlterRoutes',
    100,
  ];
  return $events;
}