You are here

public function SearchApiQueryFilter::setConjunction in Search API 7

Sets this filter's conjunction.

Parameters

string $conjunction: The conjunction to use for this filter - either 'AND' or 'OR'.

Return value

SearchApiQueryFilterInterface The called object.

Overrides SearchApiQueryFilterInterface::setConjunction

1 call to SearchApiQueryFilter::setConjunction()
SearchApiQueryFilter::__construct in includes/query.inc
Constructs a new filter that uses the specified conjunction.

File

includes/query.inc, line 1028
Contains SearchApiQueryInterface and SearchApiQuery.

Class

SearchApiQueryFilter
Provides a standard implementation of SearchApiQueryFilterInterface.

Code

public function setConjunction($conjunction) {
  $this->conjunction = strtoupper(trim($conjunction)) == 'OR' ? 'OR' : 'AND';
  return $this;
}