public function WebformOptionsCustomFilterForm::submitForm in Webform 8.5
Same name and namespace in other branches
- 6.x modules/webform_options_custom/src/Form/WebformOptionsCustomFilterForm.php \Drupal\webform_options_custom\Form\WebformOptionsCustomFilterForm::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
- modules/
webform_options_custom/ src/ Form/ WebformOptionsCustomFilterForm.php, line 66
Class
- WebformOptionsCustomFilterForm
- Provides the webform options custom filter form.
Namespace
Drupal\webform_options_custom\FormCode
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,
]);
}