function SearchPageListBuilder::submitAddSearchPage

Same name in other branches
  1. 9 core/modules/search/src/SearchPageListBuilder.php \Drupal\search\SearchPageListBuilder::submitAddSearchPage()
  2. 8.9.x core/modules/search/src/SearchPageListBuilder.php \Drupal\search\SearchPageListBuilder::submitAddSearchPage()
  3. 10 core/modules/search/src/SearchPageListBuilder.php \Drupal\search\SearchPageListBuilder::submitAddSearchPage()

Form submission handler for adding a new search page.

File

core/modules/search/src/SearchPageListBuilder.php, line 389

Class

SearchPageListBuilder
Defines a class to build a listing of search page entities.

Namespace

Drupal\search

Code

public function submitAddSearchPage(array &$form, FormStateInterface $form_state) {
    $form_state->setRedirect('search.add_type', [
        'search_plugin_id' => $form_state->getValue('search_type'),
    ]);
}

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