You are here

public function EntityStorageBase::getQuery in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/EntityStorageBase.php \Drupal\Core\Entity\EntityStorageBase::getQuery()

Gets an entity query instance.

Parameters

string $conjunction: (optional) The logical operator for the query, either:

  • AND: all of the conditions on the query need to match.
  • OR: at least one of the conditions on the query need to match.

Return value

\Drupal\Core\Entity\Query\QueryInterface The query instance.

Overrides EntityStorageInterface::getQuery

See also

\Drupal\Core\Entity\EntityStorageBase::getQueryServiceName()

1 call to EntityStorageBase::getQuery()
EntityStorageBase::loadByProperties in core/lib/Drupal/Core/Entity/EntityStorageBase.php
Load entities by their property values.

File

core/lib/Drupal/Core/Entity/EntityStorageBase.php, line 515
Contains \Drupal\Core\Entity\EntityStorageBase.

Class

EntityStorageBase
A base entity storage class.

Namespace

Drupal\Core\Entity

Code

public function getQuery($conjunction = 'AND') {

  // Access the service directly rather than entity.query factory so the
  // storage's current entity type is used.
  return \Drupal::service($this
    ->getQueryServiceName())
    ->get($this->entityType, $conjunction);
}