function AllowListConfigStorage::__construct
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Recipe/AllowListConfigStorage.php \Drupal\Core\Recipe\AllowListConfigStorage::__construct()
Parameters
\Drupal\Core\Config\StorageInterface $decorated: A config storage backend to wrap around.
string[] $allowList: A list of config names. Only these names will be visible, or readable, by this storage. Cannot be empty.
File
-
core/
lib/ Drupal/ Core/ Recipe/ AllowListConfigStorage.php, line 24
Class
- AllowListConfigStorage
- A read-only storage wrapper that only allows access to certain config names.
Namespace
Drupal\Core\RecipeCode
public function __construct(private readonly StorageInterface $decorated, private readonly array $allowList) {
if (empty($allowList)) {
throw new \LogicException('AllowListConfigStorage cannot be constructed with an empty allow list.');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.