Query.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace Drupal\Core\Entity\Query\Null;
  3. use Drupal\Core\Entity\Query\QueryAggregateInterface;
  4. use Drupal\Core\Entity\Query\QueryBase;
  5. use Drupal\Core\Entity\Query\QueryInterface;
  6. use Drupal\Core\Entity\Query\Sql\ConditionAggregate;
  7. /**
  8. * Defines the entity query for configuration entities.
  9. */
  10. class Query extends QueryBase implements QueryInterface, QueryAggregateInterface {
  11. /**
  12. * {@inheritdoc}
  13. */
  14. public function execute() {
  15. if ($this->count) {
  16. return 0;
  17. }
  18. return [];
  19. }
  20. /**
  21. * {@inheritdoc}
  22. */
  23. public function existsAggregate($field, $function, $langcode = NULL) {
  24. return $this->conditionAggregate->exists($field, $function, $langcode);
  25. }
  26. /**
  27. * {@inheritdoc}
  28. */
  29. public function notExistsAggregate($field, $function, $langcode = NULL) {
  30. return $this->conditionAggregate->notExists($field, $function, $langcode);
  31. }
  32. /**
  33. * {@inheritdoc}
  34. */
  35. public function conditionAggregateGroupFactory($conjunction = 'AND') {
  36. return new ConditionAggregate($conjunction, $this);
  37. }
  38. }