function AliasWhitelist::__construct

Same name in other branches
  1. 9 core/modules/path_alias/src/AliasWhitelist.php \Drupal\path_alias\AliasWhitelist::__construct()
  2. 8.9.x core/lib/Drupal/Core/Path/AliasWhitelist.php \Drupal\Core\Path\AliasWhitelist::__construct()

Constructs an AliasWhitelist object.

Parameters

string $cid: The cache id to use.

\Drupal\Core\Cache\CacheBackendInterface $cache: The cache backend.

\Drupal\Core\Lock\LockBackendInterface $lock: The lock backend.

\Drupal\Core\State\StateInterface $state: The state keyvalue store.

\Drupal\path_alias\AliasRepositoryInterface $alias_repository: The path alias repository.

Overrides CacheCollector::__construct

File

core/modules/path_alias/src/AliasWhitelist.php, line 43

Class

AliasWhitelist
Extends CacheCollector to build the path alias whitelist over time.

Namespace

Drupal\path_alias

Code

public function __construct($cid, CacheBackendInterface $cache, LockBackendInterface $lock, StateInterface $state, AliasRepositoryInterface $alias_repository) {
    parent::__construct($cid, $cache, $lock);
    $this->state = $state;
    $this->pathAliasRepository = $alias_repository;
}

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