You are here

public function UrlGenerator::getRouteDebugMessage in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Routing/UrlGenerator.php \Drupal\Core\Routing\UrlGenerator::getRouteDebugMessage()

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

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 445
Contains \Drupal\Core\Routing\UrlGenerator.

Class

UrlGenerator
Generates URLs from route names and parameters.

Namespace

Drupal\Core\Routing

Code

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);
}