public static function RouteCompiler::getPatternOutline

Returns the pattern outline.

The pattern outline is the path pattern but normalized so that all placeholders are equal strings and default values are removed.

Parameters

string $path: The path for which we want the normalized outline.

Return value

string The path pattern outline.

1 call to RouteCompiler::getPatternOutline()
RouteCompiler::compile in drupal/core/lib/Drupal/Core/Routing/RouteCompiler.php
Compiles the current route instance.

File

drupal/core/lib/Drupal/Core/Routing/RouteCompiler.php, line 82
Definition of Drupal\Core\Routing\RouteCompiler.

Class

RouteCompiler
Compiler to generate derived information from a Route necessary for matching.

Namespace

Drupal\Core\Routing

Code

public static function getPatternOutline($path) {
  return preg_replace('#\\{\\w+\\}#', '%', $path);
}