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