class WorkspacesAliasManager
Same name in other branches
- 11.x core/modules/workspaces/src/WorkspacesAliasManager.php \Drupal\workspaces\WorkspacesAliasManager
Decorates the path_alias.manager service for workspace-specific caching.
@internal
Hierarchy
- class \Drupal\workspaces\WorkspacesAliasManager implements \Drupal\path_alias\AliasManagerInterface
Expanded class hierarchy of WorkspacesAliasManager
File
-
core/
modules/ workspaces/ src/ WorkspacesAliasManager.php, line 14
Namespace
Drupal\workspacesView source
class WorkspacesAliasManager implements AliasManagerInterface {
public function __construct(AliasManagerInterface $inner, WorkspaceManagerInterface $workspaceManager) {
}
/**
* {@inheritdoc}
*/
public function setCacheKey($key) : void {
if ($this->workspaceManager
->hasActiveWorkspace()) {
$key = $this->workspaceManager
->getActiveWorkspace()
->id() . ':' . $key;
}
$this->inner
->setCacheKey($key);
}
/**
* {@inheritdoc}
*/
public function writeCache() : void {
$this->inner
->writeCache();
}
/**
* {@inheritdoc}
*/
public function getPathByAlias($alias, $langcode = NULL) : string {
return $this->inner
->getPathByAlias($alias, $langcode);
}
/**
* {@inheritdoc}
*/
public function getAliasByPath($path, $langcode = NULL) : string {
return $this->inner
->getAliasByPath($path, $langcode);
}
/**
* {@inheritdoc}
*/
public function cacheClear($source = NULL) : void {
$this->inner
->cacheClear($source);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
WorkspacesAliasManager::cacheClear | public | function | |
WorkspacesAliasManager::getAliasByPath | public | function | |
WorkspacesAliasManager::getPathByAlias | public | function | |
WorkspacesAliasManager::setCacheKey | public | function | |
WorkspacesAliasManager::writeCache | public | function | |
WorkspacesAliasManager::__construct | public | function |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.