You are here

public static function ConfigSyncImport::finishBatch in Configuration Synchronizer 8

Finish batch.

This function is a static function to avoid serializing the ConfigSync object unnecessarily.

Overrides ConfigSync::finishBatch

Deprecated

in drupal:8.6.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Config\Importer\ConfigImporterBatch::finish() instead.

See also

https://www.drupal.org/node/2897299

File

src/Form/ConfigSyncImport.php, line 78

Class

ConfigSyncImport
Construct the storage changes in a configuration synchronization form.

Namespace

Drupal\config_sync\Form

Code

public static function finishBatch($success, $results, $operations) {
  parent::finishBatch($success, $results, $operations);
  if ($success) {

    // Refresh the configuration snapshot.
    $config_sync_snapshotter = \Drupal::service('config_sync.snapshotter');
    $config_sync_snapshotter
      ->deleteSnapshot();
    $config_sync_snapshotter
      ->refreshSnapshot();
  }
}