You are here

public static function ConfigDistroConfigImporterBatch::finish in Config Distro 8

Finish batch.

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

Parameters

bool $success: Indicate that the batch API tasks were all completed successfully.

array $results: An array of all the results that were updated in update_do_one().

array $operations: A list of the operations that had not been completed by the batch API.

Overrides ConfigImporterBatch::finish

File

src/ConfigDistroConfigImporterBatch.php, line 18

Class

ConfigDistroConfigImporterBatch
Custom methods for running the ConfigImporter in a batch.

Namespace

Drupal\config_distro

Code

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

    // Dispatch an event to notify modules about the successful import.
    \Drupal::service('event_dispatcher')
      ->dispatch(ConfigDistroEvents::IMPORT);
  }
}