You are here

public function BrowscapAdmin::submitForm in Browscap 8.3

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/BrowscapAdmin.php, line 103

Class

BrowscapAdmin
Defines Browscap administration form.

Namespace

Drupal\browscap\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('browscap.settings')
    ->set('automatic_updates_timer', $form_state
    ->getValue('browscap_automatic_updates_timer'))
    ->set('enable_automatic_updates', $form_state
    ->getValue('browscap_enable_automatic_updates'))
    ->set('data_url', $form_state
    ->getValue('browscap_data_url'))
    ->set('version_url', $form_state
    ->getValue('browscap_version_url'))
    ->save();
  parent::submitForm($form, $form_state);
}