You are here

public function QueryTrait::__construct in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/workspaces/src/EntityQuery/QueryTrait.php \Drupal\workspaces\EntityQuery\QueryTrait::__construct()
  2. 9 core/modules/workspaces/src/EntityQuery/QueryTrait.php \Drupal\workspaces\EntityQuery\QueryTrait::__construct()

Constructs a Query 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.

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

array $namespaces: List of potential namespaces of the classes belonging to this query.

\Drupal\workspaces\WorkspaceManagerInterface $workspace_manager: The workspace manager.

File

core/modules/workspaces/src/EntityQuery/QueryTrait.php, line 36

Class

QueryTrait
Provides workspaces-specific helpers for altering entity queries.

Namespace

Drupal\workspaces\EntityQuery

Code

public function __construct(EntityTypeInterface $entity_type, $conjunction, Connection $connection, array $namespaces, WorkspaceManagerInterface $workspace_manager) {
  parent::__construct($entity_type, $conjunction, $connection, $namespaces);
  $this->workspaceManager = $workspace_manager;
}