You are here

public function MockRouteProvider::getRoutesByPattern in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Routing/MockRouteProvider.php \Drupal\system\Tests\Routing\MockRouteProvider::getRoutesByPattern()

Get all routes which match a certain pattern.

Parameters

string $pattern: The route pattern to search for (contains {} as placeholders).

Return value

\Symfony\Component\Routing\RouteCollection Returns a route collection of matching routes.

Overrides RouteProviderInterface::getRoutesByPattern

File

core/modules/system/src/Tests/Routing/MockRouteProvider.php, line 81
Contains \Drupal\system\Tests\Routing\MockRouteProvider.

Class

MockRouteProvider
Easily configurable mock route provider.

Namespace

Drupal\system\Tests\Routing

Code

public function getRoutesByPattern($pattern) {
  return new RouteCollection();
}