function WorkspacesAliasManager::getPathByAlias

Same name and namespace in other branches
  1. 11.x core/modules/workspaces/src/WorkspacesAliasManager.php \Drupal\workspaces\WorkspacesAliasManager::getPathByAlias()

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.

Overrides AliasManagerInterface::getPathByAlias

File

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

Class

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

Namespace

Drupal\workspaces

Code

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

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