You are here

public function TimezoneDetectSettings::submitForm in Timezone Detect 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/TimezoneDetectSettings.php, line 75
Administration pages for Timezone Detect module.

Class

TimezoneDetectSettings
Administration form.

Namespace

Drupal\timezone_detect\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this->configFactory
    ->getEditable('timezone_detect.settings')
    ->set('mode', $form_state
    ->getValue('mode'))
    ->set('watchdog', $form_state
    ->getValue('watchdog'))
    ->save();
  parent::submitForm($form, $form_state);
}