function ContentModerationRouteSubscriber::getSubscribedEvents

Same name in other branches
  1. 9 core/modules/content_moderation/src/Routing/ContentModerationRouteSubscriber.php \Drupal\content_moderation\Routing\ContentModerationRouteSubscriber::getSubscribedEvents()
  2. 8.9.x core/modules/content_moderation/src/Routing/ContentModerationRouteSubscriber.php \Drupal\content_moderation\Routing\ContentModerationRouteSubscriber::getSubscribedEvents()
  3. 10 core/modules/content_moderation/src/Routing/ContentModerationRouteSubscriber.php \Drupal\content_moderation\Routing\ContentModerationRouteSubscriber::getSubscribedEvents()

Overrides RouteSubscriberBase::getSubscribedEvents

File

core/modules/content_moderation/src/Routing/ContentModerationRouteSubscriber.php, line 105

Class

ContentModerationRouteSubscriber
Subscriber for moderated revisionable entity forms.

Namespace

Drupal\content_moderation\Routing

Code

public static function getSubscribedEvents() : array {
    $events = parent::getSubscribedEvents();
    // This needs to run after that EntityResolverManager has set the route
    // entity type.
    $events[RoutingEvents::ALTER] = [
        'onAlterRoutes',
        -200,
    ];
    return $events;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.