You are here

public function WebformOptionsFilterForm::submitForm in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Form/WebformOptionsFilterForm.php \Drupal\webform\Form\WebformOptionsFilterForm::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/WebformOptionsFilterForm.php, line 66

Class

WebformOptionsFilterForm
Provides the webform options 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')),
  ];
  $form_state
    ->setRedirect($this
    ->getRouteMatch()
    ->getRouteName(), $this
    ->getRouteMatch()
    ->getRawParameters()
    ->all(), [
    'query' => $query,
  ]);
}