public function QueryBase::__construct in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Entity/Query/QueryBase.php \Drupal\Core\Entity\Query\QueryBase::__construct()
- 10 core/lib/Drupal/Core/Entity/Query/QueryBase.php \Drupal\Core\Entity\Query\QueryBase::__construct()
Constructs this object.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition.
string $conjunction:
- AND: all of the conditions on the query need to match.
- OR: at least one of the conditions on the query need to match.
array $namespaces: List of potential namespaces of the classes belonging to this query.
3 calls to QueryBase::__construct()
- Query::__construct in core/
lib/ Drupal/ Core/ Config/ Entity/ Query/ Query.php - Constructs a Query object.
- Query::__construct in core/
lib/ Drupal/ Core/ Entity/ KeyValueStore/ Query/ Query.php - Constructs a new Query.
- Query::__construct in core/
lib/ Drupal/ Core/ Entity/ Query/ Sql/ Query.php - Constructs a query object.
3 methods override QueryBase::__construct()
- Query::__construct in core/
lib/ Drupal/ Core/ Config/ Entity/ Query/ Query.php - Constructs a Query object.
- Query::__construct in core/
lib/ Drupal/ Core/ Entity/ KeyValueStore/ Query/ Query.php - Constructs a new Query.
- Query::__construct in core/
lib/ Drupal/ Core/ Entity/ Query/ Sql/ Query.php - Constructs a query object.
File
- core/
lib/ Drupal/ Core/ Entity/ Query/ QueryBase.php, line 146
Class
- QueryBase
- The base entity query class.
Namespace
Drupal\Core\Entity\QueryCode
public function __construct(EntityTypeInterface $entity_type, $conjunction, array $namespaces) {
$this->entityTypeId = $entity_type
->id();
$this->entityType = $entity_type;
$this->conjunction = $conjunction;
$this->namespaces = $namespaces;
$this->condition = $this
->conditionGroupFactory($conjunction);
if ($this instanceof QueryAggregateInterface) {
$this->conditionAggregate = $this
->conditionAggregateGroupFactory($conjunction);
}
}