function SearchExtraTypeSearch::isSearchExecutable

Same name in other branches
  1. 8.9.x core/modules/search/tests/modules/search_extra_type/src/Plugin/Search/SearchExtraTypeSearch.php \Drupal\search_extra_type\Plugin\Search\SearchExtraTypeSearch::isSearchExecutable()
  2. 10 core/modules/search/tests/modules/search_extra_type/src/Plugin/Search/SearchExtraTypeSearch.php \Drupal\search_extra_type\Plugin\Search\SearchExtraTypeSearch::isSearchExecutable()
  3. 11.x core/modules/search/tests/modules/search_extra_type/src/Plugin/Search/SearchExtraTypeSearch.php \Drupal\search_extra_type\Plugin\Search\SearchExtraTypeSearch::isSearchExecutable()

Verifies if the given parameters are valid enough to execute a search for.

Return value

bool TRUE if there are keywords or search conditions in the query.

Overrides SearchPluginBase::isSearchExecutable

1 call to SearchExtraTypeSearch::isSearchExecutable()
SearchExtraTypeSearch::execute in core/modules/search/tests/modules/search_extra_type/src/Plugin/Search/SearchExtraTypeSearch.php
Execute the search.

File

core/modules/search/tests/modules/search_extra_type/src/Plugin/Search/SearchExtraTypeSearch.php, line 38

Class

SearchExtraTypeSearch
Executes a dummy keyword search.

Namespace

Drupal\search_extra_type\Plugin\Search

Code

public function isSearchExecutable() {
    return (bool) ($this->keywords || !empty($this->searchParameters['search_conditions']));
}

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