public function AliasManagerInterface::getAliasByPath in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Path/AliasManagerInterface.php \Drupal\Core\Path\AliasManagerInterface::getAliasByPath()
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.
2 methods override AliasManagerInterface::getAliasByPath()
- AliasManager::getAliasByPath in core/
lib/ Drupal/ Core/ Path/ AliasManager.php - Given a path, return the alias.
- MockAliasManager::getAliasByPath in core/
modules/ system/ src/ Tests/ Routing/ MockAliasManager.php
File
- core/
lib/ Drupal/ Core/ Path/ AliasManagerInterface.php, line 47 - Contains \Drupal\Core\Path\AliasManagerInterface.
Class
- AliasManagerInterface
- Find an alias for a path and vice versa.
Namespace
Drupal\Core\PathCode
public function getAliasByPath($path, $langcode = NULL);