function TestRouteSubscriber::routesFromCollection

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php \Drupal\Tests\Core\Routing\TestRouteSubscriber::routesFromCollection()
  2. 8.9.x core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php \Drupal\Tests\Core\Routing\TestRouteSubscriber::routesFromCollection()
  3. 10 core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php \Drupal\Tests\Core\Routing\TestRouteSubscriber::routesFromCollection()

File

core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php, line 366

Class

TestRouteSubscriber
Provides a callback for route definition.

Namespace

Drupal\Tests\Core\Routing

Code

public function routesFromCollection() {
    $collection = new RouteCollection();
    $collection->add('test_route.2', new Route('/test-route/2'));
    return $collection;
}

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