public function Batch::processNodeFinished in Node Revisions Autoclean 8
Batch Finished callback.
Parameters
bool $success: Success of the operation.
array $results: Array of results for post processing.
array $operations: Array of operations.
File
- src/
Batch/ Batch.php, line 32
Class
Namespace
Drupal\node_revisions_autoclean\BatchCode
public function processNodeFinished($success, array $results, array $operations) {
$messenger = \Drupal::messenger();
if ($success) {
$messenger
->addMessage(t('Node revisions autoclean : @count nodes processed.', [
'@count' => count($results),
]));
}
else {
$error_operation = reset($operations);
$messenger
->addMessage(t('An error occurred while processing @operation with arguments : @args', [
'@operation' => $error_operation[0],
'@args' => print_r($error_operation[0], TRUE),
]));
}
}