public static function BatchUpdateForm::batchFinished in Entity Usage 8
Same name and namespace in other branches
- 8.3 src/Form/BatchUpdateForm.php \Drupal\entity_usage\Form\BatchUpdateForm::batchFinished()
Finish callback for our batch processing.
Parameters
bool $success: Whether the batch completed successfully.
array $results: The results array.
array $operations: The operations array.
File
- src/
Form/ BatchUpdateForm.php, line 195
Class
- BatchUpdateForm
- Form to launch batch tracking of existing entities.
Namespace
Drupal\entity_usage\FormCode
public static function batchFinished($success, array $results, array $operations) {
if ($success) {
drupal_set_message(t('Recreated entity usage for @count entities.', [
'@count' => count($results),
]));
}
else {
// An error occurred.
// $operations contains the operations that remained unprocessed.
$error_operation = reset($operations);
drupal_set_message(t('An error occurred while processing @operation with arguments : @args', [
'@operation' => $error_operation[0],
'@args' => print_r($error_operation[0], TRUE),
]));
}
}