You are here

public function SuggestionSearchForm::submitForm in Autocomplete Search Suggestions 8.2

Same name and namespace in other branches
  1. 8 src/Form/SuggestionSearchForm.php \Drupal\suggestion\Form\SuggestionSearchForm::submitForm()
  2. 3.0.x src/Form/SuggestionSearchForm.php \Drupal\suggestion\Form\SuggestionSearchForm::submitForm()

Ngram search submission function.

Parameters

array $form: A drupal form array.

Drupal\Core\Form\FormStateInterface $form_state: A Drupal form state object.

Overrides FormInterface::submitForm

File

src/Form/SuggestionSearchForm.php, line 173

Class

SuggestionSearchForm
Ngram search form.

Namespace

Drupal\suggestion\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $form_state
    ->setRedirectUrl(Url::fromUri('internal:/admin/config/suggestion/search/' . $form_state
    ->getValue('ngram')));
}