You are here

public function StyleswitcherAdmin::submitForm in Style Switcher 8.2

Same name and namespace in other branches
  1. 3.0.x src/Form/StyleswitcherAdmin.php \Drupal\styleswitcher\Form\StyleswitcherAdmin::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

src/Form/StyleswitcherAdmin.php, line 90

Class

StyleswitcherAdmin
Configure Style Switcher settings.

Namespace

Drupal\styleswitcher\Form

Code

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