You are here

public function PathProcessorLanguage::processInbound in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/language/src/HttpKernel/PathProcessorLanguage.php \Drupal\language\HttpKernel\PathProcessorLanguage::processInbound()

Processes the inbound path.

Parameters

string $path: The path to process, with a leading slash.

\Symfony\Component\HttpFoundation\Request $request: The HttpRequest object representing the current request.

Return value

string The processed path.

Overrides InboundPathProcessorInterface::processInbound

File

core/modules/language/src/HttpKernel/PathProcessorLanguage.php, line 94
Contains \Drupal\language\HttpKernel\PathProcessorLanguage.

Class

PathProcessorLanguage
Processes the inbound path using path alias lookups.

Namespace

Drupal\language\HttpKernel

Code

public function processInbound($path, Request $request) {
  if (!empty($path)) {
    $scope = 'inbound';
    if (!isset($this->processors[$scope])) {
      $this
        ->initProcessors($scope);
    }
    foreach ($this->processors[$scope] as $instance) {
      $path = $instance
        ->processInbound($path, $request);
    }
  }
  return $path;
}