You are here

public function UrlGenerator::getRouteDebugMessage in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Routing/UrlGenerator.php \Drupal\Core\Routing\UrlGenerator::getRouteDebugMessage()
2 calls to UrlGenerator::getRouteDebugMessage()
UrlGenerator::generateFromRoute in core/lib/Drupal/Core/Routing/UrlGenerator.php
Generates a URL or path for a specific route based on the given parameters.
UrlGenerator::getPathFromRoute in core/lib/Drupal/Core/Routing/UrlGenerator.php
Gets the internal path (system path) for a route.

File

core/lib/Drupal/Core/Routing/UrlGenerator.php, line 443

Class

UrlGenerator
Generates URLs from route names and parameters.

Namespace

Drupal\Core\Routing

Code

public function getRouteDebugMessage($name, array $parameters = []) {
  if (is_scalar($name)) {
    return $name;
  }
  if ($name instanceof SymfonyRoute) {
    return 'Route with pattern ' . $name
      ->getPath();
  }
  return serialize($name);
}