public static function TaxonomyDeleteBatch::finishProcess in Taxonomy Delete 8
Display message about how many terms are deleted in the vocabulary.
Parameters
bool $success: Success flag.
array $results: Results from the batch handler.
array $operations: Operations flag.
File
- src/
TaxonomyDeleteBatch.php, line 35
Class
- TaxonomyDeleteBatch
- Batch Processor of the deletion of terms.
Namespace
Drupal\taxonomy_deleteCode
public static function finishProcess($success, array $results, array $operations) {
if ($success) {
$message = \Drupal::translation()
->formatPlural($results['terms'], 'One term deleted in ', '@count terms deleted in @vid', [
'@vid' => $results['vid'],
]);
}
else {
$message = t("Processed with errors");
}
\Drupal::messenger()
->addMessage($message);
}