You are here

public function NewAliasManager::getAliasByPath in Drupal 8

Given a path, return the alias.

Parameters

string $path: A path.

string $langcode: An optional language code to look up the path in.

Return value

string An alias that represents the path, or path if no alias was found.

Throws

\InvalidArgumentException Thrown when the path does not start with a slash.

Overrides AliasManagerInterface::getAliasByPath

File

core/modules/path_alias/tests/modules/path_alias_deprecated_test/src/NewAliasManager.php, line 21

Class

NewAliasManager
New test implementation for the alias manager.

Namespace

Drupal\path_alias_deprecated_test

Code

public function getAliasByPath($path, $langcode = NULL) {
}