function ContentModerationRouteSubscriber::alterRoutes

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

Overrides RouteSubscriberBase::alterRoutes

File

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

Class

ContentModerationRouteSubscriber
Subscriber for moderated revisionable entity forms.

Namespace

Drupal\content_moderation\Routing

Code

protected function alterRoutes(RouteCollection $collection) {
    foreach ($collection as $route) {
        $this->setLatestRevisionFlag($route);
    }
}

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