protected function UrlGenerator::processPath

Passes the path to a processor manager to allow alterations.

2 calls to UrlGenerator::processPath()
1 method overrides UrlGenerator::processPath()

File

drupal/core/lib/Drupal/Core/Routing/UrlGenerator.php, line 373
Contains Drupal\Core\Routing\UrlGenerator.

Class

UrlGenerator
A Generator creates URL strings based on a specified route.

Namespace

Drupal\Core\Routing

Code

protected function processPath($path, &$options = array()) {

  // Router-based paths may have a querystring on them.
  if ($query_pos = strpos($path, '?')) {

    // We don't need to do a strict check here because position 0 would mean we
    // have no actual path to work with.
    $actual_path = substr($path, 0, $query_pos);
    $query_string = substr($path, $query_pos);
  }
  else {
    $actual_path = $path;
    $query_string = '';
  }
  $path = '/' . $this->pathProcessor
    ->processOutbound(trim($actual_path, '/'), $options, $this->request);
  $path .= $query_string;
  return $path;
}