SearchPageListBuilder::validateAddSearchPage

public SearchPageListBuilder::validateAddSearchPage(array &$form, FormStateInterface $form_state)

Form validation handler for adding a new search page.

File

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

Class

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

Namespace

Drupal\search

Code

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.'));
  }
}
doc_Drupal
2016-10-29 09:40:43
Comments
Leave a Comment

Please login to continue.