public function ConditionGroup::__construct in Search API 8
Constructs a ConditionGroup object.
Parameters
string $conjunction: (optional) The conjunction to use for this condition group - either 'AND' or 'OR'.
string[] $tags: (optional) An arbitrary set of tags. Can be used to identify this condition group after it's been added to the query. This is primarily used by the facet system to support OR facet queries.
File
- src/
Query/ ConditionGroup.php, line 45
Class
- ConditionGroup
- Provides a standard implementation for a Search API query condition group.
Namespace
Drupal\search_api\QueryCode
public function __construct($conjunction = 'AND', array $tags = []) {
$this->conjunction = strtoupper(trim($conjunction)) == 'OR' ? 'OR' : 'AND';
$this->tags = array_combine($tags, $tags);
}