You are here

public function SwitchPageThemeSettingForm::submitForm in Switch Page Theme 8.2

Same name and namespace in other branches
  1. 8.3 src/Form/SwitchPageThemeSettingForm.php \Drupal\switch_page_theme\Form\SwitchPageThemeSettingForm::submitForm()
  2. 8 src/Form/SwitchPageThemeSettingForm.php \Drupal\switch_page_theme\Form\SwitchPageThemeSettingForm::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/SwitchPageThemeSettingForm.php, line 319

Class

SwitchPageThemeSettingForm
Configuration page for Switch page theme settings.

Namespace

Drupal\switch_page_theme\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {

  // Retrieve the configuration.
  $this
    ->config('switch_page_theme.settings')
    ->set('spt_table', $form_state
    ->getValue('spt_table'))
    ->save();
  parent::submitForm($form, $form_state);
}