You are here

public static function BulkDeleteForm::bulkDeleteFinishedBatch in Bulk Delete 8

Batch finish function.

This function is called by the batch 'finished' parameter. The cache must not be cleared as the last batch operation, but after the batch is finished.

Parameters

bool $success: Indicates if the batch was successfully finished.

array $results: The value of the results item from the context variable used in the batch processing.

array $operations: If the success parameter is false then this is a list of the operations that haven't completed yet.

File

src/Form/BulkDeleteForm.php, line 177

Class

BulkDeleteForm
BackupDatabaseForm class.

Namespace

Drupal\bulkdelete\Form

Code

public static function bulkDeleteFinishedBatch($success, array $results, array $operations) {
  drupal_flush_all_caches();
  $message = $success ? t('Bulkdelete performed successfully.') : t('Bulkdelete has not been finished successfully.');
  \Drupal::logger('bulkdelete')
    ->notice($message);
  \Drupal::messenger()
    ->addMessage($message);
}