public function AliasManager::getSystemPath

Implements \Drupal\Core\Path\AliasManagerInterface::getSystemPath().

Overrides AliasManagerInterface::getSystemPath

File

drupal/core/lib/Drupal/Core/Path/AliasManager.php, line 94
Contains Drupal\Core\Path\AliasManager.

Class

AliasManager

Namespace

Drupal\Core\Path

Code

public function getSystemPath($path, $path_language = NULL) {

  // If no language is explicitly specified we default to the current URL
  // language. If we used a language different from the one conveyed by the
  // requested URL, we might end up being unable to check if there is a path
  // alias matching the URL path.
  $path_language = $path_language ?: $this->langcode;
  $original_path = $path;

  // Lookup the path alias first.
  if (!empty($path) && ($source = $this
    ->lookupPathSource($path, $path_language))) {
    $path = $source;
  }
  return $path;
}