Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. RouteProviderInterface.php

function 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.

2 methods override RouteProviderInterface::getRouteByName()
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 50

Class

RouteProviderInterface
Defines the route provider interface.

Namespace

Drupal\Core\Routing

Code

public function getRouteByName($name);
RSS feed
Powered by Drupal