public function MockAliasManager::addAlias

Adds an alias to the in-memory alias table for this object.

Parameters

type $path: The system path of the alias.

type $alias: The alias of the system path.

type $path_language: The language of this alias.

File

drupal/core/modules/system/lib/Drupal/system/Tests/Routing/MockAliasManager.php, line 55
Contains Drupal\system\Tests\Routing\MockAliasManager.

Class

MockAliasManager
An easily configurable mock alias manager.

Namespace

Drupal\system\Tests\Routing

Code

public function addAlias($path, $alias, $path_language = NULL) {
  $language = $path_language ?: $this->defaultLanguage;
  $this->aliases[$path][$language] = $alias;
  $this->systemPaths[$alias][$language] = $path;
}