public QueryBase::__construct(EntityTypeInterface $entity_type, $conjunction, array $namespaces)
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.
File
- core/lib/Drupal/Core/Entity/Query/QueryBase.php, line 138
Class
- QueryBase
- The base entity query class.
Namespace
Drupal\Core\Entity\Query
Code
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); } }
Please login to continue.