You are here

public function EntityStorageBase::getQuery in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/EntityStorageBase.php \Drupal\Core\Entity\EntityStorageBase::getQuery()
  2. 9 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()

6 calls to EntityStorageBase::getQuery()
ContentEntityStorageBase::getLatestRevisionId in core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
Returns the latest revision identifier for an entity.
ContentEntityStorageBase::getLatestTranslationAffectedRevisionId in core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
Returns the latest revision affecting the specified translation.
ContentEntityStorageBase::isAnyStoredRevisionTranslated in core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
Checks whether any stored entity revision is translated.
ContentEntityStorageBase::preLoad in core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
Gathers entities from a 'preload' step.
EntityStorageBase::hasData in core/lib/Drupal/Core/Entity/EntityStorageBase.php
Determines if the storage contains any data.

... See full list

File

core/lib/Drupal/Core/Entity/EntityStorageBase.php, line 623

Class

EntityStorageBase
A base entity storage class.

Namespace

Drupal\Core\Entity

Code

public function getQuery($conjunction = 'AND') {
  return \Drupal::service($this
    ->getQueryServiceName())
    ->get($this->entityType, $conjunction);
}