You are here

interface ConfigSyncSnapshotterInterface in Configuration Synchronizer 8.2

Same name and namespace in other branches
  1. 8 src/ConfigSyncSnapshotterInterface.php \Drupal\config_sync\ConfigSyncSnapshotterInterface

The ConfigSyncSnapshotter provides helper functions for taking snapshots of extension-provided configuration.

Hierarchy

Expanded class hierarchy of ConfigSyncSnapshotterInterface

All classes that implement ConfigSyncSnapshotterInterface

7 files declare their use of ConfigSyncSnapshotterInterface
ConfigSyncSnapshotSubscriber.php in src/EventSubscriber/ConfigSyncSnapshotSubscriber.php
config_sync.install in ./config_sync.install
Install, update and uninstall functions for the config_sync module.
config_sync.module in ./config_sync.module
Manage synchronizing configuration from extensions.
ImportTest.php in tests/src/Functional/ImportTest.php
SyncConfigCollector.php in src/Plugin/SyncConfigCollector.php

... See full list

File

src/ConfigSyncSnapshotterInterface.php, line 9

Namespace

Drupal\config_sync
View source
interface ConfigSyncSnapshotterInterface {

  /**
   * Install snapshot mode.
   */
  const SNAPSHOT_MODE_INSTALL = 'install';

  /**
   * Import snapshot mode.
   */
  const SNAPSHOT_MODE_IMPORT = 'import';

  /**
   * Install snapshot mode.
   */
  const CONFIG_SNAPSHOT_SET = 'config_sync';

  /**
   * Takes a snapshot of configuration from specified modules or themes.
   *
   * Two modes are supported: install and import. Install mode is invoked when
   * an extension is initially installed, while import mode is invoked on
   * subsequent import of configuration updates.
   *
   * The distinction between install and import modes has implications for the
   * handling of extension-provided configuration alters. Alters are considered
   * to be "owned" by the extension that provides them. On install, existing
   * snapshots should be altered only the newly-installed module or modules.
   * This approach ensures the snapshot mirrors the installed state of the
   * extension-provided configuration. In contrast, on import, alters should be
   * applied from all installed modules.
   *
   * @param string $type
   *   The type of extension to snapshot.
   * @param array $names
   *   An array of extension names.
   * @param string $mode
   *   The snapshot mode. Valid values are:
   *   - \Drupal\config_sync\ConfigSyncSnapshotterInterface::SNAPSHOT_MODE_INSTALL
   *   - \Drupal\config_sync\ConfigSyncSnapshotterInterface::SNAPSHOT_MODE_IMPORT
   */
  public function refreshExtensionSnapshot($type, array $names, $mode);

  /**
   * Takes a snapshot of configuration from all installed modules and themes.
   */
  public function createSnapshot();

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigSyncSnapshotterInterface::CONFIG_SNAPSHOT_SET constant Install snapshot mode.
ConfigSyncSnapshotterInterface::createSnapshot public function Takes a snapshot of configuration from all installed modules and themes. 1
ConfigSyncSnapshotterInterface::refreshExtensionSnapshot public function Takes a snapshot of configuration from specified modules or themes. 1
ConfigSyncSnapshotterInterface::SNAPSHOT_MODE_IMPORT constant Import snapshot mode.
ConfigSyncSnapshotterInterface::SNAPSHOT_MODE_INSTALL constant Install snapshot mode.