function FileStorage::__construct
Same name in this branch
- main core/lib/Drupal/Component/PhpStorage/FileStorage.php \Drupal\Component\PhpStorage\FileStorage::__construct()
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Config/FileStorage.php \Drupal\Core\Config\FileStorage::__construct()
- 11.x core/lib/Drupal/Component/PhpStorage/FileStorage.php \Drupal\Component\PhpStorage\FileStorage::__construct()
- 10 core/lib/Drupal/Core/Config/FileStorage.php \Drupal\Core\Config\FileStorage::__construct()
- 10 core/lib/Drupal/Component/PhpStorage/FileStorage.php \Drupal\Component\PhpStorage\FileStorage::__construct()
- 9 core/lib/Drupal/Core/Config/FileStorage.php \Drupal\Core\Config\FileStorage::__construct()
- 9 core/lib/Drupal/Component/PhpStorage/FileStorage.php \Drupal\Component\PhpStorage\FileStorage::__construct()
- 8.9.x core/lib/Drupal/Core/Config/FileStorage.php \Drupal\Core\Config\FileStorage::__construct()
- 8.9.x core/lib/Drupal/Component/PhpStorage/FileStorage.php \Drupal\Component\PhpStorage\FileStorage::__construct()
Constructs a new FileStorage.
Parameters
string $directory: A directory path to use for reading and writing of configuration files.
string $collection: (optional) The collection to store configuration in. Defaults to the default collection.
?Drupal\Core\Cache\CacheCollectorInterface $yamlCacheCollector: The YAML cache collector. If not passed, a YAMl cache collector with a memory backend will be used.
1 call to FileStorage::__construct()
- InstallStorage::__construct in core/
lib/ Drupal/ Core/ Config/ InstallStorage.php - Constructs an InstallStorage object.
1 method overrides FileStorage::__construct()
- InstallStorage::__construct in core/
lib/ Drupal/ Core/ Config/ InstallStorage.php - Constructs an InstallStorage object.
File
-
core/
lib/ Drupal/ Core/ Config/ FileStorage.php, line 29
Class
- FileStorage
- Defines the file storage.
Namespace
Drupal\Core\ConfigCode
public function __construct(protected string $directory, protected string $collection = StorageInterface::DEFAULT_COLLECTION, protected ?CacheCollectorInterface $yamlCacheCollector = NULL) {
if (!isset($yamlCacheCollector)) {
$this->yamlCacheCollector = YamlCacheCollector::createWithMemoryCache();
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.