function ConfigSnapshotSubscriber::__construct

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

Constructs the ConfigSnapshotSubscriber object.

Parameters

\Drupal\Core\Config\ConfigManagerInterface $config_manager: The configuration manager.

\Drupal\Core\Config\StorageInterface $source_storage: The source storage used to discover configuration changes.

\Drupal\Core\Config\StorageInterface $snapshot_storage: The snapshot storage used to write configuration changes.

File

core/lib/Drupal/Core/EventSubscriber/ConfigSnapshotSubscriber.php, line 47

Class

ConfigSnapshotSubscriber
Create a snapshot when config is imported.

Namespace

Drupal\Core\EventSubscriber

Code

public function __construct(ConfigManagerInterface $config_manager, StorageInterface $source_storage, StorageInterface $snapshot_storage) {
    $this->configManager = $config_manager;
    $this->sourceStorage = $source_storage;
    $this->snapshotStorage = $snapshot_storage;
}

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