You are here

public function WebformEntityFilterForm::submitForm in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Form/WebformEntityFilterForm.php \Drupal\webform\Form\WebformEntityFilterForm::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

src/Form/WebformEntityFilterForm.php, line 107

Class

WebformEntityFilterForm
Provides the webform filter form.

Namespace

Drupal\webform\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $query = [
    'search' => trim($form_state
      ->getValue('search')),
    'category' => trim($form_state
      ->getValue('category')),
    'state' => trim($form_state
      ->getValue('state')),
  ];
  $form_state
    ->setRedirect($this
    ->getRouteMatch()
    ->getRouteName(), $this
    ->getRouteMatch()
    ->getRawParameters()
    ->all(), [
    'query' => $query,
  ]);
}