You are here

public function DBLogFilterSettingsForm::submitForm in DBLog Filter 8

Same name and namespace in other branches
  1. 8.2 src/Form/DBLogFilterSettingsForm.php \Drupal\dblog_filter\Form\DBLogFilterSettingsForm::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

src/Form/DBLogFilterSettingsForm.php, line 87

Class

DBLogFilterSettingsForm
Settings Form for Dblog Filter.

Namespace

Drupal\dblog_filter\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {

  // Save configurations.
  $config = $this
    ->config('dblog_filter.settings')
    ->set('log_values', $form_state
    ->getValue('log_values'))
    ->set('severity_levels', $form_state
    ->getValue('severity_levels'));
  $config
    ->save();
  parent::submitForm($form, $form_state);
}