public function ContentUpdateConfirmForm::buildForm in GatherContent 8.3
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 ContentConfirmForm::buildForm
File
- src/
Form/ ContentUpdateConfirmForm.php, line 53
Class
- ContentUpdateConfirmForm
- Provides a node deletion confirmation form.
Namespace
Drupal\gathercontent\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form = parent::buildForm($form, $form_state);
$import_config = $this
->configFactory()
->get('gathercontent.import');
$form['node_update_method'] = [
'#type' => 'radios',
'#required' => TRUE,
'#title' => $this
->t('Content update method'),
'#default_value' => $import_config
->get('node_update_method'),
'#options' => [
'always_create' => $this
->t('Always create new Content'),
'update_if_not_changed' => $this
->t('Create new Content if it has changed since the last import'),
'always_update' => $this
->t('Always update existing Content'),
],
];
return $form;
}