class ConfigSnapshotSubscriber implements EventSubscriberInterface (View source)

Create a snapshot when config is imported.

Properties

protected ConfigManagerInterface $configManager

The configuration manager.

protected StorageInterface $sourceStorage

The source storage used to discover configuration changes.

protected StorageInterface $snapshotStorage

The snapshot storage used to write configuration changes.

Methods

__construct(ConfigManagerInterface $config_manager, StorageInterface $source_storage, StorageInterface $snapshot_storage)

Constructs the ConfigSnapshotSubscriber object.

onConfigImporterImport(ConfigImporterEvent $event)

Creates a config snapshot.

static array
getSubscribedEvents()

Registers the methods in this class that should be listeners.

Details

__construct(ConfigManagerInterface $config_manager, StorageInterface $source_storage, StorageInterface $snapshot_storage)

Constructs the ConfigSnapshotSubscriber object.

Parameters

ConfigManagerInterface $config_manager
StorageInterface $source_storage

The source storage used to discover configuration changes.

StorageInterface $snapshot_storage

The snapshot storage used to write configuration changes.

onConfigImporterImport(ConfigImporterEvent $event)

Creates a config snapshot.

Parameters

ConfigImporterEvent $event

The Event to process.

static array getSubscribedEvents()

Registers the methods in this class that should be listeners.

Return Value

array

An array of event listener definitions.