You are here

public function CounterSettingsAdvanced::submitForm in Counter 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/CounterSettingsAdvanced.php, line 77

Class

CounterSettingsAdvanced
Class AddForm.

Namespace

Drupal\counter\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  parent::submitForm($form, $form_state);
  $this
    ->config('counter.settings')
    ->set('counter_skip_admin', $form_state
    ->getValue('counter_skip_admin'))
    ->set('counter_refresh_delay', $form_state
    ->getValue('counter_refresh_delay'))
    ->set('counter_insert_delay', $form_state
    ->getValue('counter_insert_delay'))
    ->save();
}