You are here

public function NodeSearch::isSearchExecutable in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/node/src/Plugin/Search/NodeSearch.php \Drupal\node\Plugin\Search\NodeSearch::isSearchExecutable()

Verifies if the values set via setSearch() are valid and sufficient.

Return value

bool TRUE if the search settings are valid and sufficient to execute a search, and FALSE if not.

Overrides SearchPluginBase::isSearchExecutable

1 call to NodeSearch::isSearchExecutable()
NodeSearch::execute in core/modules/node/src/Plugin/Search/NodeSearch.php
Executes the search.

File

core/modules/node/src/Plugin/Search/NodeSearch.php, line 186
Contains \Drupal\node\Plugin\Search\NodeSearch.

Class

NodeSearch
Handles searching for node entities using the Search module index.

Namespace

Drupal\node\Plugin\Search

Code

public function isSearchExecutable() {

  // Node search is executable if we have keywords or an advanced parameter.
  // At least, we should parse out the parameters and see if there are any
  // keyword matches in that case, rather than just printing out the
  // "Please enter keywords" message.
  return !empty($this->keywords) || isset($this->searchParameters['f']) && count($this->searchParameters['f']);
}