public function Query::__construct

Same name in this branch
  1. 8.x drupal/core/lib/Drupal/Core/Database/Query/Query.php \Drupal\Core\Database\Query\Query::__construct()
  2. 8.x drupal/core/lib/Drupal/Core/Config/Entity/Query/Query.php \Drupal\Core\Config\Entity\Query\Query::__construct()
  3. 8.x drupal/core/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/Query.php \Drupal\field_sql_storage\Entity\Query::__construct()

Constructs a query object.

Parameters

string $entity_type: The entity type.

\Drupal\Core\Entity\EntityManager $entity_manager: The entity manager storing the entity info.

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.

\Drupal\Core\Database\Connection $connection: The database connection to run the query against.

Overrides QueryBase::__construct

File

drupal/core/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/Query.php, line 82
Definition of Drupal\field_sql_storage\Entity\Query.

Class

Query
The SQL storage entity query class.

Namespace

Drupal\field_sql_storage\Entity

Code

public function __construct($entity_type, EntityManager $entity_manager, $conjunction, Connection $connection) {
  parent::__construct($entity_type, $conjunction, $connection);
  $this->entityManager = $entity_manager;
  $this->connection = $connection;
}