public static function BulkCloneProduct::batchFinished in Entity Bulk Clone 8
File
- src/
Plugin/ Action/ BulkCloneProduct.php, line 42
Class
- BulkCloneProduct
- Entity Bulk clone of commerce product.
Namespace
Drupal\entity_bulk_clone\Plugin\ActionCode
public static function batchFinished($success, $results, $operations) {
// The 'success' parameter means no fatal PHP errors were detected.
if ($success) {
$message = \Drupal::translation()
->formatPlural(count($results), 'Bulk Clone was applied to ', '@count items.');
\Drupal::messenger()
->addStatus($message);
}
else {
$message = $this
->t('Finished with an error.');
\Drupal::messenger()
->addError($message);
}
}