You are here

public function GAPushSettingsForm::submitForm in GA Push 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/GAPushSettingsForm.php, line 58

Class

GAPushSettingsForm
GA Push Settings Form.

Namespace

Drupal\ga_push\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('ga_push.settings')
    ->set('google_analytics_id', $form_state
    ->getValue('google_analytics_id'))
    ->set('default_method', $form_state
    ->getValue('ga_push_default_method'))
    ->set('debug', $form_state
    ->getValue('ga_push_debug'))
    ->save();
  parent::submitForm($form, $form_state);
}