You are here

public function DistroStorageManager::__construct in Config Distro 8

DistroStorageManager constructor.

Parameters

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

\Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher: The event dispatcher.

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

File

src/DistroStorageManager.php, line 71

Class

DistroStorageManager
The distro storage manager dispatches an event for the distro storage.

Namespace

Drupal\config_distro

Code

public function __construct(StorageInterface $active, 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 MemoryStorage();
}