3 namespace Drupal\diff\Routing;
5 use Drupal\Core\Routing\RouteSubscriberBase;
6 use Symfony\Component\Routing\RouteCollection;
9 * Listens to the dynamic route events.
11 class RouteSubscriber extends RouteSubscriberBase {
16 public function alterRoutes(RouteCollection $collection) {
17 // Replace the content from node.revision_overview route with content
18 // generated by revisionOverview method from NodeRevisionController class.
19 $route = $collection->get('entity.node.version_history');
23 '_controller' => '\Drupal\diff\Controller\NodeRevisionController::revisionOverview',