You are here

public function Query::setParseMode in Search API 8

Sets the parse mode.

Parameters

\Drupal\search_api\ParseMode\ParseModeInterface $parse_mode: The parse mode.

Return value

$this

Overrides QueryInterface::setParseMode

File

src/Query/Query.php, line 391

Class

Query
Provides a standard implementation for a Search API query.

Namespace

Drupal\search_api\Query

Code

public function setParseMode(ParseModeInterface $parse_mode) {
  $this->parseMode = $parse_mode;
  if (is_scalar($this->origKeys)) {
    $this->keys = $parse_mode
      ->parseInput($this->origKeys);
  }
  return $this;
}