You are here

public function SearchApiQueryFilter::__construct in Search API 7

Constructs a new filter that uses the specified conjunction.

Parameters

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

array $tags: (optional) An arbitrary set of tags. Can be used to identify this filter down the line if necessary. This is primarily used by the facet system to support OR facet queries.

Overrides SearchApiQueryFilterInterface::__construct

File

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

Class

SearchApiQueryFilter
Provides a standard implementation of SearchApiQueryFilterInterface.

Code

public function __construct($conjunction = 'AND', array $tags = array()) {
  $this
    ->setConjunction($conjunction);
  $this->filters = array();
  $this->tags = drupal_map_assoc($tags);
}