You are here

public function VISettingsForm::submitForm in Visually Impaired Support (module) 8

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

src/Form/VISettingsForm.php, line 81

Class

VISettingsForm
Defines a form that configures forms module settings.

Namespace

Drupal\visually_impaired_module\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $values = $form_state
    ->getValues();
  $this
    ->config('visually_impaired_module.visually_impaired_module.settings')
    ->set('visually_impaired_theme', $values['default_visually_impaired_theme'])
    ->save();
}