public function AliasManagerCacheDecorator::getSystemPath

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

Overrides AliasManagerInterface::getSystemPath

File

drupal/core/lib/Drupal/Core/CacheDecorator/AliasManagerCacheDecorator.php, line 90
Contains Drupal\Core\CacheDecorator\AliasManagerCacheDecorator.

Class

AliasManagerCacheDecorator
Class used by the PathSubscriber to get the system path and cache path lookups.

Namespace

Drupal\Core\CacheDecorator

Code

public function getSystemPath($path, $path_language = NULL) {
  $system_path = $this->aliasManager
    ->getSystemPath($path, $path_language);

  // We need to pass on the list of previously cached system paths for this
  // key to the alias manager for use in subsequent lookups.
  $cached = $this->cache
    ->get($system_path);
  $cached_paths = array();
  if ($cached) {
    $cached_paths = $cached->data;
    $this->cacheNeedsWriting = FALSE;
  }
  $this
    ->preloadPathLookups($cached_paths);
  return $system_path;
}