You are here

public static function JsonapiBatchHelper::importEntityListBatchBatchFinished in Entity Share 8

Same name and namespace in other branches
  1. 8.2 modules/entity_share_client/src/JsonapiBatchHelper.php \Drupal\entity_share_client\JsonapiBatchHelper::importEntityListBatchBatchFinished()

Batch finish callback.

Parameters

bool $success: A boolean indicating whether the batch has completed successfully.

array $results: The value set in $context['results'] by callback_batch_operation().

array $operations: If $success is FALSE, contains the operations that remained unprocessed.

File

modules/entity_share_client/src/JsonapiBatchHelper.php, line 58

Class

JsonapiBatchHelper
Class JsonapiBatchHelper.

Namespace

Drupal\entity_share_client

Code

public static function importEntityListBatchBatchFinished($success, array $results, array $operations) {
  if ($success) {
    $message = new PluralTranslatableMarkup(count($results), 'One entity processed.', '@count entities processed.');
  }
  else {
    $message = t('Finished with an error.');
  }
  drupal_set_message($message);
}