RouteCompiler::getPatternOutline

public static RouteCompiler::getPatternOutline($path)

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.

File

core/lib/Drupal/Core/Routing/RouteCompiler.php, line 73

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);
}
doc_Drupal
2016-10-29 09:39:04
Comments
Leave a Comment

Please login to continue.