function TestRouteSubscriber::routesFromArray

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

File

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

Class

TestRouteSubscriber
Provides a callback for route definition.

Namespace

Drupal\Tests\Core\Routing

Code

public function routesFromArray() {
    return [
        'test_route.1' => new Route('/test-route/1'),
    ];
}

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