function RouteProviderInterface::getRouteByName

Same name in other branches
  1. 10 core/lib/Drupal/Core/Routing/RouteProviderInterface.php \Drupal\Core\Routing\RouteProviderInterface::getRouteByName()
  2. 11.x core/lib/Drupal/Core/Routing/RouteProviderInterface.php \Drupal\Core\Routing\RouteProviderInterface::getRouteByName()

Find the route using the provided route name.

Parameters

string $name: The route name to fetch

Return value

\Symfony\Component\Routing\Route The Symfony route object.

Throws

\Symfony\Component\Routing\Exception\RouteNotFoundException If a matching route cannot be found.

4 methods override RouteProviderInterface::getRouteByName()
MockRouteProvider::getRouteByName in core/modules/system/src/Tests/Routing/MockRouteProvider.php
Find the route using the provided route name.
RouteProvider::getRouteByName in core/tests/Drupal/KernelTests/RouteProvider.php
Find the route using the provided route name.
RouteProvider::getRouteByName in core/lib/Drupal/Core/Routing/RouteProvider.php
Find the route using the provided route name.
RouteProviderLazyBuilder::getRouteByName in core/lib/Drupal/Core/Routing/RouteProviderLazyBuilder.php
Find the route using the provided route name.

File

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

Class

RouteProviderInterface
Extends the router provider interface.

Namespace

Drupal\Core\Routing

Code

public function getRouteByName($name);

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