public function YamlFormtemplatesFilterForm::submitForm in YAML Form 8
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/
yamlform_templates/ src/ Form/ YamlFormTemplatesFilterForm.php, line 59
Class
- YamlFormtemplatesFilterForm
- Provides the form templates filter form.
Namespace
Drupal\yamlform_templates\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$query = [
'search' => trim($form_state
->getValue('search')),
];
$form_state
->setRedirect($this
->getRouteMatch()
->getRouteName(), $this
->getRouteMatch()
->getRawParameters()
->all(), [
'query' => $query,
]);
}