You are here

TestRouteSubscriber.php in Devel 8

File

tests/modules/devel_test/src/Routing/TestRouteSubscriber.php
View source
<?php

namespace Drupal\devel_test\Routing;

use Drupal\Core\Routing\RouteSubscriberBase;
use Symfony\Component\Routing\RouteCollection;

/**
 * Router subscriber class for testing purpose.
 */
class TestRouteSubscriber extends RouteSubscriberBase {

  /**
   * {@inheritdoc}
   */
  protected function alterRoutes(RouteCollection $collection) {
    \Drupal::state()
      ->set('devel_test_route_rebuild', 'Router rebuild fired');
  }

}

Classes

Namesort descending Description
TestRouteSubscriber Router subscriber class for testing purpose.