public function MergeConfirmForm::submitForm in Bibliography & Citation 8
Same name and namespace in other branches
- 2.0.x modules/bibcite_entity/src/Form/MergeConfirmForm.php \Drupal\bibcite_entity\Form\MergeConfirmForm::submitForm()
Form submission handler.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides FormInterface::submitForm
File
- modules/
bibcite_entity/ src/ Form/ MergeConfirmForm.php, line 117
Class
- MergeConfirmForm
- Confirm merge of bibliographic entities.
Namespace
Drupal\bibcite_entity\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$batch = [
'title' => t('Merging'),
'operations' => [
[
'bibcite_entity_merge_entity',
[
$this->source
->id(),
$this->target
->id(),
$this->source
->getEntityTypeId(),
$this->fieldName,
],
],
[
'bibcite_entity_merge_entity_delete',
[
$this->source
->id(),
$this->source
->getEntityTypeId(),
$this->fieldName,
],
],
],
'finished' => 'bibcite_entity_merge_entity_finished',
'file' => drupal_get_path('module', 'bibcite_entity') . '/bibcite_entity.batch.inc',
];
batch_set($batch);
}