StorageReplaceDataWrapper::__construct

public StorageReplaceDataWrapper::__construct(StorageInterface $storage, $collection = StorageInterface::DEFAULT_COLLECTION)

Constructs a new StorageReplaceDataWrapper.

Parameters

\Drupal\Core\Config\StorageInterface $storage: A configuration storage to be used to read and write configuration.

string $collection: (optional) The collection to store configuration in. Defaults to the default collection.

File

core/modules/config/src/StorageReplaceDataWrapper.php, line 44

Class

StorageReplaceDataWrapper
Wraps a configuration storage to allow replacing specific configuration data.

Namespace

Drupal\config

Code

1
2
3
4
5
public function __construct(StorageInterface $storage, $collection = StorageInterface::DEFAULT_COLLECTION) {
  $this->storage = $storage;
  $this->collection = $collection;
  $this->replacementData[$collection] = [];
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.