You are here

public function SuggestionSearchForm::submitForm in Autocomplete Search Suggestions 3.0.x

Same name and namespace in other branches
  1. 8.2 src/Form/SuggestionSearchForm.php \Drupal\suggestion\Form\SuggestionSearchForm::submitForm()
  2. 8 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 161

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')));
}