public static function BatchUserAction::finishBatch in Drupal 10
Same name and namespace in other branches
- 8 core/modules/views/tests/modules/user_batch_action_test/src/Plugin/Action/BatchUserAction.php \Drupal\user_batch_action_test\Plugin\Action\BatchUserAction::finishBatch()
- 9 core/modules/views/tests/modules/user_batch_action_test/src/Plugin/Action/BatchUserAction.php \Drupal\user_batch_action_test\Plugin\Action\BatchUserAction::finishBatch()
Finish batch.
Parameters
bool $success: Indicates whether the batch process was successful.
array $results: Results information passed from the processing callback.
File
- core/
modules/ views/ tests/ modules/ user_batch_action_test/ src/ Plugin/ Action/ BatchUserAction.php, line 85
Class
- BatchUserAction
- Provides action that sets batch precessing.
Namespace
Drupal\user_batch_action_test\Plugin\ActionCode
public static function finishBatch($success, $results) {
\Drupal::messenger()
->addMessage(\Drupal::translation()
->formatPlural($results['processed'], 'One item has been processed.', '@count items have been processed.'));
\Drupal::messenger()
->addMessage($results['theme'] . ' theme used');
}