public function WebformTemplatesFilterForm::submitForm in Webform 8.5
Same name and namespace in other branches
- 6.x modules/webform_templates/src/Form/WebformTemplatesFilterForm.php \Drupal\webform_templates\Form\WebformTemplatesFilterForm::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_templates/ src/ Form/ WebformTemplatesFilterForm.php, line 98
Class
- WebformTemplatesFilterForm
- Provides the webform templates filter webform.
Namespace
Drupal\webform_templates\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,
]);
}