Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. RouteCompiler.php

function RouteCompiler::getPatternOutline

Returns the pattern outline.

The pattern outline is the path pattern but normalized so that all placeholders are the string '%'.

Parameters

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

Return value

string The path pattern outline.

3 calls to RouteCompiler::getPatternOutline()
PathPluginBase::overrideAppliesPathAndMethod in core/modules/views/src/Plugin/views/display/PathPluginBase.php
Determines whether an override for the path and method should happen.
RouteCompiler::compile in core/lib/Drupal/Core/Routing/RouteCompiler.php
Compiles the current route instance.
RouteProvider::getRoutesByPattern in core/lib/Drupal/Core/Routing/RouteProvider.php
Get all routes which match a certain pattern.

File

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

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal