function ExportStorageManager::__construct

Same name in other branches
  1. 9 core/lib/Drupal/Core/Config/ExportStorageManager.php \Drupal\Core\Config\ExportStorageManager::__construct()
  2. 10 core/lib/Drupal/Core/Config/ExportStorageManager.php \Drupal\Core\Config\ExportStorageManager::__construct()
  3. 11.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\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher: The event dispatcher.

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

File

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

Class

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

Namespace

Drupal\Core\Config

Code

public function __construct(StorageInterface $active, Connection $connection, EventDispatcherInterface $event_dispatcher, LockBackendInterface $lock) {
    $this->active = $active;
    $this->eventDispatcher = $event_dispatcher;
    $this->lock = $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.