public function MergeForm::buildForm in Bibliography & Citation 8
Same name and namespace in other branches
- 2.0.x modules/bibcite_entity/src/Form/MergeForm.php \Drupal\bibcite_entity\Form\MergeForm::buildForm()
Form constructor.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array The form structure.
Overrides FormInterface::buildForm
File
- modules/
bibcite_entity/ src/ Form/ MergeForm.php, line 47
Class
- MergeForm
- Merge bibliographic entities.
Namespace
Drupal\bibcite_entity\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form['target'] = [
'#type' => 'entity_autocomplete',
'#title' => $this
->t('Select target'),
'#description' => $this
->t('@entity_type_label to be merged into.', [
'@entity_type_label' => $this->entity
->getEntityType()
->getLabel(),
]),
'#target_type' => $this->entity
->getEntityTypeId(),
'#required' => TRUE,
];
$form['actions'] = [
'#type' => 'actions',
];
$form['actions']['submit'] = [
'#type' => 'submit',
'#value' => $this
->t('Merge'),
];
return $form;
}