public static function DeleteTmgmtActionApproveForm::processBatch in TMGMT Extension Suite 8.2
Same name and namespace in other branches
- 8.3 src/Form/DeleteTmgmtActionApproveForm.php \Drupal\tmgmt_extension_suit\Form\DeleteTmgmtActionApproveForm::processBatch()
- 8 src/Form/DeleteTmgmtActionApproveForm.php \Drupal\tmgmt_extension_suit\Form\DeleteTmgmtActionApproveForm::processBatch()
Processes the sending batch.
Parameters
array $data: Keyed array of data to send.
array $context: The batch context.
Return value
JobInterface|mixed
Overrides BaseTmgmtActionApproveForm::processBatch
File
- src/
Form/ DeleteTmgmtActionApproveForm.php, line 50
Class
- DeleteTmgmtActionApproveForm
- Provides a confirmation form for sending multiple content entities.
Namespace
Drupal\tmgmt_extension_suit\FormCode
public static function processBatch($data, &$context) {
$job = parent::processBatch($data, $context);
if (!empty($job)) {
$job
->delete();
$context['results']['count']++;
$context['message'] = new FormattableMarkup('Processed %name.', [
'%name' => $job
->label(),
]);
}
else {
$context['message'] = new FormattableMarkup('Skipped %name.', [
'%name' => $data['entity_type'],
]);
}
}