UrlGenerator::getRouteDebugMessage

public UrlGenerator::getRouteDebugMessage($name, array $parameters = array())

Convert a route identifier (name, content object etc) into a string usable for logging and other debug/error messages.

Parameters

mixed $name:

array $parameters which should contain a content field containing: a RouteReferrersReadInterface object

Return value

string

Overrides VersatileGeneratorInterface::getRouteDebugMessage

File

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

Class

UrlGenerator
Generates URLs from route names and parameters.

Namespace

Drupal\Core\Routing

Code

1
2
3
4
5
6
7
8
9
10
11
public function getRouteDebugMessage($name, array $parameters = array()) {
  if (is_scalar($name)) {
    return $name;
  }
 
  if ($name instanceof SymfonyRoute) {
    return 'Route with pattern ' . $name->getPath();
  }
 
  return serialize($name);
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.