You are here

public function SettingsForm::submitForm in Synonyms 2.0.x

Same name in this branch
  1. 2.0.x src/Form/SettingsForm.php \Drupal\synonyms\Form\SettingsForm::submitForm()
  2. 2.0.x modules/synonyms_list_field/src/Form/SettingsForm.php \Drupal\synonyms_list_field\Form\SettingsForm::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 ConfigFormBase::submitForm

File

modules/synonyms_list_field/src/Form/SettingsForm.php, line 48

Class

SettingsForm
Synonyms list field settings form.

Namespace

Drupal\synonyms_list_field\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('synonyms_list_field.settings')
    ->set('include_entity_label', $form_state
    ->getValue('include_entity_label'))
    ->save();
  parent::submitForm($form, $form_state);
}