function RouteProviderInterface::getRoutesByPattern

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Routing/RouteProviderInterface.php \Drupal\Core\Routing\RouteProviderInterface::getRoutesByPattern()
  2. 10 core/lib/Drupal/Core/Routing/RouteProviderInterface.php \Drupal\Core\Routing\RouteProviderInterface::getRoutesByPattern()
  3. 11.x core/lib/Drupal/Core/Routing/RouteProviderInterface.php \Drupal\Core\Routing\RouteProviderInterface::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.

4 methods override RouteProviderInterface::getRoutesByPattern()
MockRouteProvider::getRoutesByPattern in core/modules/system/src/Tests/Routing/MockRouteProvider.php
Get all routes which match a certain pattern.
RouteProvider::getRoutesByPattern in core/tests/Drupal/KernelTests/RouteProvider.php
Get all routes which match a certain pattern.
RouteProvider::getRoutesByPattern in core/lib/Drupal/Core/Routing/RouteProvider.php
Get all routes which match a certain pattern.
RouteProviderLazyBuilder::getRoutesByPattern in core/lib/Drupal/Core/Routing/RouteProviderLazyBuilder.php
Get all routes which match a certain pattern.

File

core/lib/Drupal/Core/Routing/RouteProviderInterface.php, line 91

Class

RouteProviderInterface
Extends the router provider interface.

Namespace

Drupal\Core\Routing

Code

public function getRoutesByPattern($pattern);

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