You are here

public function AnalyticsSettingsForm::submitForm in Analytics 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/AnalyticsSettingsForm.php, line 71

Class

AnalyticsSettingsForm
Settings form for the Analytics module.

Namespace

Drupal\analytics\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('analytics.settings')
    ->set('privacy', $form_state
    ->getValue('privacy'))
    ->set('cache_urls', $form_state
    ->getValue('cache_urls'))
    ->set('disable_page_build', $form_state
    ->getValue('disable_page_build'))
    ->save();
  parent::submitForm($form, $form_state);
}