You are here

public function RouteProviderLazyBuilder::getRouteByName in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Routing/RouteProviderLazyBuilder.php \Drupal\Core\Routing\RouteProviderLazyBuilder::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.

Overrides RouteProviderInterface::getRouteByName

1 call to RouteProviderLazyBuilder::getRouteByName()
InstallerRouteProviderLazyBuilder::getRouteByName in core/lib/Drupal/Core/Installer/InstallerRouteProviderLazyBuilder.php
Find the route using the provided route name.
1 method overrides RouteProviderLazyBuilder::getRouteByName()
InstallerRouteProviderLazyBuilder::getRouteByName in core/lib/Drupal/Core/Installer/InstallerRouteProviderLazyBuilder.php
Find the route using the provided route name.

File

core/lib/Drupal/Core/Routing/RouteProviderLazyBuilder.php, line 82

Class

RouteProviderLazyBuilder
A Route Provider front-end for all Drupal-stored routes.

Namespace

Drupal\Core\Routing

Code

public function getRouteByName($name) {
  return $this
    ->getRouteProvider()
    ->getRouteByName($name);
}