You are here

public function ConfigForm::submitForm in Devel 8

Same name and namespace in other branches
  1. 8.3 webprofiler/src/Form/ConfigForm.php \Drupal\webprofiler\Form\ConfigForm::submitForm()
  2. 8.2 webprofiler/src/Form/ConfigForm.php \Drupal\webprofiler\Form\ConfigForm::submitForm()
  3. 4.x webprofiler/src/Form/ConfigForm.php \Drupal\webprofiler\Form\ConfigForm::submitForm()

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

webprofiler/src/Form/ConfigForm.php, line 189

Class

ConfigForm
Class ConfigForm

Namespace

Drupal\webprofiler\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('webprofiler.config')
    ->set('purge_on_cache_clear', $form_state
    ->getValue('purge_on_cache_clear'))
    ->set('storage', $form_state
    ->getValue('storage'))
    ->set('exclude', $form_state
    ->getValue('exclude'))
    ->set('active_toolbar_items', $form_state
    ->getValue('active_toolbar_items'))
    ->set('ide_link', $form_state
    ->getValue('ide_link'))
    ->set('ide_link_remote', $form_state
    ->getValue('ide_link_remote'))
    ->set('ide_link_local', $form_state
    ->getValue('ide_link_local'))
    ->set('query_sort', $form_state
    ->getValue('query_sort'))
    ->set('query_highlight', $form_state
    ->getValue('query_highlight'))
    ->save();
  parent::submitForm($form, $form_state);
}