public static function TaxonomyMultideleteBatch::finishProcess in Taxonomy Multi-delete Terms 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/
TaxonomyMultideleteBatch.php, line 35
Class
- TaxonomyMultideleteBatch
- Batch Processor of the deletion of terms.
Namespace
Drupal\taxonomy_multidelete_termsCode
public static function finishProcess($success, array $results, array $operations) {
if ($success) {
$message = \Drupal::translation()
->formatPlural($results['terms'], '1 term deleted ', '@count terms deleted');
}
else {
$message = t("Processed with errors");
}
\Drupal::messenger()
->addMessage($message);
}