You are here

public function SearchApiQuery::createConditionGroup in Search API 8

Creates a new condition group to use with this query object.

Parameters

string $conjunction: The conjunction to use for the condition group – either 'AND' or 'OR'.

string[] $tags: (optional) Tags to set on the condition group.

Return value

\Drupal\search_api\Query\ConditionGroupInterface A condition group object that is set to use the specified conjunction.

See also

\Drupal\search_api\Query\QueryInterface::createConditionGroup()

File

src/Plugin/views/query/SearchApiQuery.php, line 928

Class

SearchApiQuery
Defines a Views query class for searching on Search API indexes.

Namespace

Drupal\search_api\Plugin\views\query

Code

public function createConditionGroup($conjunction = 'AND', array $tags = []) {
  if (!$this
    ->shouldAbort()) {
    return $this->query
      ->createConditionGroup($conjunction, $tags);
  }
  return new ConditionGroup($conjunction, $tags);
}