You are here

public function SettingsForm::submitForm in Page Load Progress 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/SettingsForm.php, line 92

Class

SettingsForm
Allows to configure the page_load_progress module.

Namespace

Drupal\page_load_progress\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('page_load_progress.settings')
    ->set('page_load_progress_time', $form_state
    ->getValue('page_load_progress_time'))
    ->set('page_load_progress_request_path', $form_state
    ->getValue('page_load_progress_request_path'))
    ->set('page_load_progress_request_path_negate_condition', $form_state
    ->getValue('page_load_progress_request_path_negate_condition'))
    ->set('page_load_progress_internal_links', $form_state
    ->getValue('page_load_progress_internal_links'))
    ->set('page_load_progress_esc_key', $form_state
    ->getValue('page_load_progress_esc_key'))
    ->save();
  parent::submitForm($form, $form_state);
}