You are here

public function PathProcessorFront::processInbound in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/PathProcessor/PathProcessorFront.php \Drupal\Core\PathProcessor\PathProcessorFront::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/lib/Drupal/Core/PathProcessor/PathProcessorFront.php, line 41
Contains \Drupal\Core\PathProcessor\PathProcessorFront.

Class

PathProcessorFront
Processes the inbound path by resolving it to the front page if empty.

Namespace

Drupal\Core\PathProcessor

Code

public function processInbound($path, Request $request) {
  if ($path === '/') {
    $path = $this->config
      ->get('system.site')
      ->get('page.front');
  }
  return $path;
}