function SearchPageListBuilder::validateAddSearchPage
Same name in other branches
- 8.9.x core/modules/search/src/SearchPageListBuilder.php \Drupal\search\SearchPageListBuilder::validateAddSearchPage()
- 10 core/modules/search/src/SearchPageListBuilder.php \Drupal\search\SearchPageListBuilder::validateAddSearchPage()
- 11.x core/modules/search/src/SearchPageListBuilder.php \Drupal\search\SearchPageListBuilder::validateAddSearchPage()
Form validation handler for adding a new search page.
File
-
core/
modules/ search/ src/ SearchPageListBuilder.php, line 382
Class
- SearchPageListBuilder
- Defines a class to build a listing of search page entities.
Namespace
Drupal\searchCode
public function validateAddSearchPage(array &$form, FormStateInterface $form_state) {
if ($form_state->isValueEmpty('search_type')) {
$form_state->setErrorByName('search_type', $this->t('You must select the new search page type.'));
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.