function AliasManager::__construct
Same name in other branches
- 9 core/modules/path_alias/src/AliasManager.php \Drupal\path_alias\AliasManager::__construct()
- 8.9.x core/lib/Drupal/Core/Path/AliasManager.php \Drupal\Core\Path\AliasManager::__construct()
- 11.x core/modules/path_alias/src/AliasManager.php \Drupal\path_alias\AliasManager::__construct()
Constructs an AliasManager.
Parameters
\Drupal\path_alias\AliasRepositoryInterface $alias_repository: The path alias repository.
\Drupal\path_alias\AliasWhitelistInterface $whitelist: The whitelist implementation to use.
\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.
\Drupal\Core\Cache\CacheBackendInterface $cache: Cache backend.
\Drupal\Component\Datetime\TimeInterface|null $time: The time service.
File
-
core/
modules/ path_alias/ src/ AliasManager.php, line 109
Class
- AliasManager
- The default alias manager implementation.
Namespace
Drupal\path_aliasCode
public function __construct(AliasRepositoryInterface $alias_repository, AliasWhitelistInterface $whitelist, LanguageManagerInterface $language_manager, CacheBackendInterface $cache, ?TimeInterface $time = NULL) {
$this->pathAliasRepository = $alias_repository;
$this->languageManager = $language_manager;
$this->whitelist = $whitelist;
$this->cache = $cache;
if (!$time) {
@trigger_error('Calling ' . __METHOD__ . '() without the $time argument is deprecated in drupal:10.3.0 and it will be required in drupal:11.0.0. See https://www.drupal.org/node/3387233', E_USER_DEPRECATED);
$this->time = \Drupal::service(TimeInterface::class);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.