function MockRouteProvider::getRoutesByPattern
Same name and namespace in other branches
- 8.9.x core/modules/system/src/Tests/Routing/MockRouteProvider.php \Drupal\system\Tests\Routing\MockRouteProvider::getRoutesByPattern()
- 10 core/modules/system/src/Tests/Routing/MockRouteProvider.php \Drupal\system\Tests\Routing\MockRouteProvider::getRoutesByPattern()
- 11.x 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. The collection may be empty and will be sorted from highest to lowest fit (match of path parts) and then in ascending order by route name for routes with the same fit.
Overrides RouteProviderInterface::getRoutesByPattern
File
-
core/
modules/ system/ src/ Tests/ Routing/ MockRouteProvider.php, line 76
Class
- MockRouteProvider
- Easily configurable mock route provider.
Namespace
Drupal\system\Tests\RoutingCode
public function getRoutesByPattern($pattern) {
return new RouteCollection();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.