function UrlGenerator::getRouteDebugMessage

Same name in other branches
  1. 9 core/lib/Drupal/Core/Routing/UrlGenerator.php \Drupal\Core\Routing\UrlGenerator::getRouteDebugMessage()
  2. 10 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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.