function UrlGenerator::processPath

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Routing/UrlGenerator.php \Drupal\Core\Routing\UrlGenerator::processPath()
  2. 10 core/lib/Drupal/Core/Routing/UrlGenerator.php \Drupal\Core\Routing\UrlGenerator::processPath()
  3. 11.x core/lib/Drupal/Core/Routing/UrlGenerator.php \Drupal\Core\Routing\UrlGenerator::processPath()

Passes the path to a processor manager to allow alterations.

1 call to UrlGenerator::processPath()
UrlGenerator::generateFromRoute in core/lib/Drupal/Core/Routing/UrlGenerator.php
Generates a URL or path for a specific route based on the given parameters.
1 method overrides UrlGenerator::processPath()
NullGenerator::processPath in core/lib/Drupal/Core/Routing/NullGenerator.php
Passes the path to a processor manager to allow alterations.

File

core/lib/Drupal/Core/Routing/UrlGenerator.php, line 387

Class

UrlGenerator
Generates URLs from route names and parameters.

Namespace

Drupal\Core\Routing

Code

protected function processPath($path, &$options = [], BubbleableMetadata $bubbleable_metadata = NULL) {
    $actual_path = $path === '/' ? $path : rtrim($path, '/');
    return $this->pathProcessor
        ->processOutbound($actual_path, $options, $this->requestStack
        ->getCurrentRequest(), $bubbleable_metadata);
}

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