You are here

public static function LayoutBuilderBlockSanitizerBatch::batchCompleted in Layout Builder Block Sanitizer 8

Callback for batch processing completed.

File

src/LayoutBuilderBlockSanitizerBatch.php, line 118

Class

LayoutBuilderBlockSanitizerBatch
Class LayoutBuilderBlockSanitizerBatch.

Namespace

Drupal\layout_builder_block_sanitizer

Code

public static function batchCompleted($success, $results, $operations) {
  $messenger = \Drupal::messenger();
  if ($success == TRUE) {
    $messenger
      ->addMessage(t('@count nodes were sanitized.', [
      '@count' => count($results),
    ]));
  }
  else {

    // An error occurred.
    $messenger
      ->addMessage(t('An error occurred while processing.'));
  }
}