function WorkspacesAliasManager::getAliasByPath

Same name and namespace in other branches
  1. 11.x core/modules/workspaces/src/WorkspacesAliasManager.php \Drupal\workspaces\WorkspacesAliasManager::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.

Overrides AliasManagerInterface::getAliasByPath

File

core/modules/workspaces/src/WorkspacesAliasManager.php, line 48

Class

WorkspacesAliasManager
Decorates the path_alias.manager service for workspace-specific caching.

Namespace

Drupal\workspaces

Code

public function getAliasByPath($path, $langcode = NULL) : string {
  return $this->inner
    ->getAliasByPath($path, $langcode);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.