public static function ContentHubImportQueue::batchFinished in Acquia Content Hub 8
Batch finish callback.
This will inspect the results of the batch and will display a message to indicate how the batch process ended.
Parameters
bool $success: The result of batch process.
array $result: The result of $context.
array $operations: The operations that were run.
File
- src/
Controller/ ContentHubImportQueue.php, line 140
Class
- ContentHubImportQueue
- Implements an Import Queue for entities.
Namespace
Drupal\acquia_contenthub\ControllerCode
public static function batchFinished($success, array $result, array $operations) {
if ($success) {
\Drupal::messenger()
->addStatus(t("Processed all Content Hub entities."));
return;
}
$error_operation = reset($operations);
\Drupal::messenger()
->addStatus(t('An error occurred while processing @operation with arguments : @args', [
'@operation' => $error_operation[0],
'@args' => print_r($error_operation[0], TRUE),
]));
}