protected function ContentModerationRouteSubscriber::alterRoutes in Drupal 8
Same name and namespace in other branches
- 9 core/modules/content_moderation/src/Routing/ContentModerationRouteSubscriber.php \Drupal\content_moderation\Routing\ContentModerationRouteSubscriber::alterRoutes()
Alters existing routes for a specific collection.
Parameters
\Symfony\Component\Routing\RouteCollection $collection: The route collection for adding routes.
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\RoutingCode
protected function alterRoutes(RouteCollection $collection) {
foreach ($collection as $route) {
$this
->setLatestRevisionFlag($route);
}
}