public static function BaseTmgmtActionApproveForm::processBatch in TMGMT Extension Suite 8.2
Same name and namespace in other branches
- 8.3 src/Form/BaseTmgmtActionApproveForm.php \Drupal\tmgmt_extension_suit\Form\BaseTmgmtActionApproveForm::processBatch()
- 8 src/Form/BaseTmgmtActionApproveForm.php \Drupal\tmgmt_extension_suit\Form\BaseTmgmtActionApproveForm::processBatch()
Processes the sending batch.
Parameters
array $data: Keyed array of data to send.
array $context: The batch context.
Return value
JobInterface|mixed
4 calls to BaseTmgmtActionApproveForm::processBatch()
- CancelTmgmtActionApproveForm::processBatch in src/
Form/ CancelTmgmtActionApproveForm.php - Processes the sending batch.
- ClearJobItemsDataTmgmtActionApproveForm::processBatch in src/
Form/ ClearJobItemsDataTmgmtActionApproveForm.php - Processes the sending batch.
- DeleteTmgmtActionApproveForm::processBatch in src/
Form/ DeleteTmgmtActionApproveForm.php - Processes the sending batch.
- DownloadTmgmtActionApproveForm::processBatch in src/
Form/ DownloadTmgmtActionApproveForm.php - Processes the sending batch.
5 methods override BaseTmgmtActionApproveForm::processBatch()
- CancelTmgmtActionApproveForm::processBatch in src/
Form/ CancelTmgmtActionApproveForm.php - Processes the sending batch.
- ClearJobItemsDataTmgmtActionApproveForm::processBatch in src/
Form/ ClearJobItemsDataTmgmtActionApproveForm.php - Processes the sending batch.
- DeleteTmgmtActionApproveForm::processBatch in src/
Form/ DeleteTmgmtActionApproveForm.php - Processes the sending batch.
- DownloadTmgmtActionApproveForm::processBatch in src/
Form/ DownloadTmgmtActionApproveForm.php - Processes the sending batch.
- RequestTranslationTmgmtActionApproveForm::processBatch in src/
Form/ RequestTranslationTmgmtActionApproveForm.php - Processes the sending batch.
File
- src/
Form/ BaseTmgmtActionApproveForm.php, line 227
Class
- BaseTmgmtActionApproveForm
- Provides a confirmation form for sending multiple content entities.
Namespace
Drupal\tmgmt_extension_suit\FormCode
public static function processBatch($data, &$context) {
if (!isset($context['results']['errors'])) {
$context['results']['errors'] = [];
$context['results']['count'] = 0;
}
$entity_type_id = $data['entity_type'];
$entity_id = $data['entity_id'];
$job = \Drupal::entityTypeManager()
->getStorage($entity_type_id)
->loadMultiple([
$entity_id,
]);
$job = reset($job);
if (!$job) {
$context['results']['errors'][] = t('Entity @entity_type:@entity_id not found', [
'@entity_type' => $entity_type_id,
'@entity_id' => $entity_id,
]);
}
return $job;
}