MockAliasManager
class MockAliasManager implements AliasManagerInterface (View source)
An easily configurable mock alias manager.
Properties
| protected array | $aliases | Array of mocked aliases. Keys are system paths, followed by language. |
|
| protected array | $systemPaths | Array of mocked aliases. Keys are aliases, followed by language. |
|
| protected array | $lookedUp | An index of aliases that have been requested. |
|
| string | $defaultLanguage | The language to assume a path alias is for if not specified. |
Methods
Adds an alias to the in-memory alias table for this object.
Given the alias, return the path it represents.
Given a path, return the alias.
Clears the static caches in alias manager and rebuilds the whitelist.
Details
addAlias(string $path, string $alias, string $path_language = NULL)
Adds an alias to the in-memory alias table for this object.
string
getPathByAlias(string $alias, string $langcode = NULL)
Given the alias, return the path it represents.
string
getAliasByPath(string $path, string $langcode = NULL)
Given a path, return the alias.
cacheClear($source = NULL)
Clears the static caches in alias manager and rebuilds the whitelist.