You are here

public function NewAliasManager::getPathByAlias in Drupal 8

Given the alias, return the path it represents.

Parameters

string $alias: An alias.

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

Return value

string The path represented by alias, or the alias if no path was found.

Throws

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

Overrides AliasManagerInterface::getPathByAlias

File

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

Class

NewAliasManager
New test implementation for the alias manager.

Namespace

Drupal\path_alias_deprecated_test

Code

public function getPathByAlias($alias, $langcode = NULL) {
}