function ExportStorageManager::__construct

Same name and namespace in other branches
  1. 10 core/lib/Drupal/Core/Config/ExportStorageManager.php \Drupal\Core\Config\ExportStorageManager::__construct()
  2. 9 core/lib/Drupal/Core/Config/ExportStorageManager.php \Drupal\Core\Config\ExportStorageManager::__construct()
  3. 8.9.x core/lib/Drupal/Core/Config/ExportStorageManager.php \Drupal\Core\Config\ExportStorageManager::__construct()

ExportStorageManager constructor.

Parameters

\Drupal\Core\Config\StorageInterface $active: The active config storage to prime the export storage.

\Drupal\Core\Database\Connection $connection: The database connection.

\Symfony\Contracts\EventDispatcher\EventDispatcherInterface $eventDispatcher: The event dispatcher.

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

File

core/lib/Drupal/Core/Config/ExportStorageManager.php, line 44

Class

ExportStorageManager
The export storage manager dispatches an event for the export storage.

Namespace

Drupal\Core\Config

Code

public function __construct(protected StorageInterface $active, protected Connection $connection, protected EventDispatcherInterface $eventDispatcher, protected LockBackendInterface $lock) {
  // The point of this service is to provide the storage and dispatch the
  // event when needed, so the storage itself can not be a service.
  $this->storage = new DatabaseStorage($connection, 'config_export');
}

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