public function SearchQuery::searchExpression

Sets up the search query expression.

Parameters

$query: A search query string, which can contain options.

$module: The search module. This maps to {search_index}.type in the database.

Return value

The SearchQuery object.

File

drupal/core/modules/search/lib/Drupal/search/SearchQuery.php, line 156
Definition of Drupal\search\SearchQuery.

Class

SearchQuery
Do a query on the full-text search index for a word or words.

Namespace

Drupal\search

Code

public function searchExpression($expression, $module) {
  $this->searchExpression = $expression;
  $this->type = $module;
  return $this;
}