public static function ViewsBulkOperationsBatch::finished in Views Bulk Operations (VBO) 8
Same name and namespace in other branches
- 8.2 src/ViewsBulkOperationsBatch.php \Drupal\views_bulk_operations\ViewsBulkOperationsBatch::finished()
Batch finished callback.
Parameters
bool $success: Was the process successfull?
array $results: Batch process results array.
array $operations: Performed operations array.
1 call to ViewsBulkOperationsBatch::finished()
- ViewsBulkOperationsActionProcessor::executeProcessing in src/
Service/ ViewsBulkOperationsActionProcessor.php - Helper function for processing results from view data.
File
- src/
ViewsBulkOperationsBatch.php, line 165
Class
- ViewsBulkOperationsBatch
- Defines module Batch API methods.
Namespace
Drupal\views_bulk_operationsCode
public static function finished($success, array $results, array $operations) {
if ($success) {
$operations = array_count_values($results['operations']);
$details = [];
foreach ($operations as $op => $count) {
$details[] = $op . ' (' . $count . ')';
}
$message = static::t('Action processing results: @operations.', [
'@operations' => implode(', ', $details),
]);
static::message($message);
}
else {
$message = static::t('Finished with an error.');
static::message($message, 'error');
}
}