You are here

protected function NullGenerator::getInternalPathFromRoute in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Routing/NullGenerator.php \Drupal\Core\Routing\NullGenerator::getInternalPathFromRoute()

Gets the path of a route.

Parameters

$name: The route name or other debug message.

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

array $parameters: An array of parameters as passed to \Symfony\Component\Routing\Generator\UrlGeneratorInterface::generate().

array $query_params: An array of query string parameter, which will get any extra values from $parameters merged in.

Return value

string The URL path corresponding to the route, without the base path, not URL encoded.

Overrides UrlGenerator::getInternalPathFromRoute

File

core/lib/Drupal/Core/Routing/NullGenerator.php, line 55

Class

NullGenerator
No-op implementation of a Url Generator, needed for backward compatibility.

Namespace

Drupal\Core\Routing

Code

protected function getInternalPathFromRoute($name, Route $route, $parameters = [], &$query_params = []) {
  return $route
    ->getPath();
}