public function RouteProvider::getRouteByName in Drupal 9
Same name in this branch
- 9 core/tests/Drupal/KernelTests/RouteProvider.php \Drupal\KernelTests\RouteProvider::getRouteByName()
- 9 core/lib/Drupal/Core/Routing/RouteProvider.php \Drupal\Core\Routing\RouteProvider::getRouteByName()
Same name and namespace in other branches
- 8 core/tests/Drupal/KernelTests/RouteProvider.php \Drupal\KernelTests\RouteProvider::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
File
- core/
tests/ Drupal/ KernelTests/ RouteProvider.php, line 41
Class
- RouteProvider
- Rebuilds the router when the provider is instantiated.
Namespace
Drupal\KernelTestsCode
public function getRouteByName($name) {
return $this
->lazyLoadItself()
->getRouteByName($name);
}