function config_import_create_snapshot

Creates a configuration snapshot following a successful import.

Parameters

Drupal\Core\Config\StorageInterface $source_storage: The storage to synchronize configuration from.

Drupal\Core\Config\StorageInterface $snapshot_storage: The storage to synchronize configuration to.

3 calls to config_import_create_snapshot()
ConfigSnapshotSubscriber::onConfigImporterImport in drupal/core/lib/Drupal/Core/EventSubscriber/ConfigSnapshotSubscriber.php
Creates a config snapshot.
ConfigSnapshotTest::testSnapshot in drupal/core/modules/config/lib/Drupal/config/Tests/ConfigSnapshotTest.php
Tests config snapshot creation and updating.
install_finished in drupal/core/includes/install.core.inc
Performs final installation steps and displays a 'finished' page.

File

drupal/core/includes/config.inc, line 192
This is the API for configuration storage.

Code

function config_import_create_snapshot(StorageInterface $source_storage, StorageInterface $snapshot_storage) {
  $snapshot_storage
    ->deleteAll();
  foreach ($source_storage
    ->listAll() as $name) {
    $snapshot_storage
      ->write($name, $source_storage
      ->read($name));
  }
}