You are here

public function DblogFilterForm::submitForm in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/dblog/src/Form/DblogFilterForm.php \Drupal\dblog\Form\DblogFilterForm::submitForm()
  2. 10 core/modules/dblog/src/Form/DblogFilterForm.php \Drupal\dblog\Form\DblogFilterForm::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 FormInterface::submitForm

File

core/modules/dblog/src/Form/DblogFilterForm.php, line 77

Class

DblogFilterForm
Provides the database logging filter form.

Namespace

Drupal\dblog\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $filters = dblog_filters();
  foreach ($filters as $name => $filter) {
    if ($form_state
      ->hasValue($name)) {
      $_SESSION['dblog_overview_filter'][$name] = $form_state
        ->getValue($name);
    }
  }
}