You are here

public function MockAliasManager::getAliasByPath in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Routing/MockAliasManager.php \Drupal\system\Tests\Routing\MockAliasManager::getAliasByPath()

Parameters

$path:

null $langcode:

Overrides AliasManagerInterface::getAliasByPath

File

core/modules/system/src/Tests/Routing/MockAliasManager.php, line 83
Contains \Drupal\system\Tests\Routing\MockAliasManager.

Class

MockAliasManager
An easily configurable mock alias manager.

Namespace

Drupal\system\Tests\Routing

Code

public function getAliasByPath($path, $langcode = NULL) {
  $langcode = $langcode ?: $this->defaultLanguage;
  $this->lookedUp[$path] = 1;
  return $this->aliases[$path][$langcode];
}