function PathFilterForm::submitForm

Same name and namespace in other branches
  1. 11.x core/modules/path/src/Form/PathFilterForm.php \Drupal\path\Form\PathFilterForm::submitForm()
  2. 10 core/modules/path/src/Form/PathFilterForm.php \Drupal\path\Form\PathFilterForm::submitForm()
  3. 9 core/modules/path/src/Form/PathFilterForm.php \Drupal\path\Form\PathFilterForm::submitForm()
  4. main core/modules/path/src/Form/PathFilterForm.php \Drupal\path\Form\PathFilterForm::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

core/modules/path/src/Form/PathFilterForm.php, line 58

Class

PathFilterForm
Provides the path admin overview filter form.

Namespace

Drupal\path\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $form_state->setRedirect('entity.path_alias.collection', [], [
    'query' => [
      'search' => trim($form_state->getValue('filter')),
    ],
  ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.