AliasManagerInterface::getAliasByPath

public AliasManagerInterface::getAliasByPath($path, $langcode = NULL)

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.

File

core/lib/Drupal/Core/Path/AliasManagerInterface.php, line 42

Class

AliasManagerInterface
Find an alias for a path and vice versa.

Namespace

Drupal\Core\Path

Code

public function getAliasByPath($path, $langcode = NULL);
doc_Drupal
2016-10-29 08:44:11
Comments
Leave a Comment

Please login to continue.