QueryInterface::count

public QueryInterface::count() Makes this a count query. For count queries, execute() returns the number entities found. Return value \Drupal\Core\Entity\Query\QueryInterface The called object. File core/lib/Drupal/Core/Entity/Query/QueryInterface.php, line 162 Class QueryInterface Interface for entity queries. Namespace Drupal\Core\Entity\Query Code public function count();

QueryInterface::condition

public QueryInterface::condition($field, $value = NULL, $operator = NULL, $langcode = NULL) Add a condition to the query or a condition group. For example, to find all entities containing both the Turkish 'merhaba' and the Polish 'siema' within a 'greetings' text field: $entity_ids = \Drupal::entityQuery($entity_type) ->condition('greetings', 'merhaba', '=', 'tr') ->condition('greetings.value', 'siema', '=', 'pl') ->execute(); Parameters $field: Name of the field being

QueryInterface::andConditionGroup

public QueryInterface::andConditionGroup() Creates a new group of conditions ANDed together. For example, consider a drawing entity type with a 'figures' multi-value field containing 'shape' and 'color' columns. To find all drawings containing both a red triangle and a blue circle: $query = \Drupal::entityQuery('drawing'); $group = $query->andConditionGroup() ->condition('figures.color', 'red') ->condition('figures.shape', 'triangle'); $query->condition($group); $gro

QueryInterface::allRevisions

public QueryInterface::allRevisions() Queries all the revisions. Return value $this File core/lib/Drupal/Core/Entity/Query/QueryInterface.php, line 257 Class QueryInterface Interface for entity queries. Namespace Drupal\Core\Entity\Query Code public function allRevisions();

QueryInterface::accessCheck

public QueryInterface::accessCheck($access_check = TRUE) Return value \Drupal\Core\Entity\Query\QueryInterface The called object. File core/lib/Drupal/Core/Entity/Query/QueryInterface.php, line 182 Class QueryInterface Interface for entity queries. Namespace Drupal\Core\Entity\Query Code public function accessCheck($access_check = TRUE);

QueryInterface

Interface for entity queries. Never instantiate classes implementing this interface directly. Always use the QueryFactory class. Hierarchy interface \Drupal\Core\Database\Query\AlterableInterfaceinterface \Drupal\Core\Entity\Query\QueryInterface Related topics Database abstraction layer Allow the use of different database servers using the same code base. File core/lib/Drupal/Core/Entity/Query/QueryInterface.php, line 15 Namespace Drupal\Core\Entity\Query Members Name Modifiers

QueryFactoryInterface::getAggregate

public QueryFactoryInterface::getAggregate(EntityTypeInterface $entity_type, $conjunction) Instantiates an aggregation query object for a given entity type. 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. Return value \Drupal\Core\Entity\Query\QueryAggregateInterface The query object that can query the given

QueryFactoryInterface::get

public QueryFactoryInterface::get(EntityTypeInterface $entity_type, $conjunction) Instantiates an entity query for a given entity type. Parameters \Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition. string $conjunction: The operator to use to combine conditions: 'AND' or 'OR'. Return value \Drupal\Core\Entity\Query\QueryInterface An entity query for a specific configuration entity type. File core/lib/Drupal/Core/Entity/Query/QueryFactoryInterface.php, line 22

QueryFactoryInterface

Defines an interface for QueryFactory classes. Hierarchy interface \Drupal\Core\Entity\Query\QueryFactoryInterface File core/lib/Drupal/Core/Entity/Query/QueryFactoryInterface.php, line 9 Namespace Drupal\Core\Entity\Query Members Name Modifiers Type Description QueryFactoryInterface::get public function Instantiates an entity query for a given entity type. QueryFactoryInterface::getAggregate public function Instantiates an aggregation query object for a given en

QueryFactory::__construct

public QueryFactory::__construct(ConfigFactoryInterface $config_factory, KeyValueFactoryInterface $key_value, ConfigManagerInterface $config_manager) Constructs a QueryFactory object. Parameters \Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config storage used by the config entity query. \Drupal\Core\KeyValueStore\KeyValueFactoryInterface $key_value: The key value factory. \Drupal\Core\Config\ConfigManagerInterface $config_manager: The configuration manager. File core/lib/Dru