You are here

protected function ContentModerationRouteSubscriber::alterRoutes in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/content_moderation/src/Routing/ContentModerationRouteSubscriber.php \Drupal\content_moderation\Routing\ContentModerationRouteSubscriber::alterRoutes()
  2. 9 core/modules/content_moderation/src/Routing/ContentModerationRouteSubscriber.php \Drupal\content_moderation\Routing\ContentModerationRouteSubscriber::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);
  }
}