Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / lib / Drupal / Core / Entity / Query / QueryFactoryInterface.php
1 <?php
2
3 namespace Drupal\Core\Entity\Query;
4
5 use Drupal\Core\Entity\EntityTypeInterface;
6
7 /**
8  * Defines an interface for QueryFactory classes.
9  */
10 interface QueryFactoryInterface {
11
12   /**
13    * Instantiates an entity query for a given entity type.
14    *
15    * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
16    *   The entity type definition.
17    * @param string $conjunction
18    *   The operator to use to combine conditions: 'AND' or 'OR'.
19    *
20    * @return \Drupal\Core\Entity\Query\QueryInterface
21    *   An entity query for a specific configuration entity type.
22    */
23   public function get(EntityTypeInterface $entity_type, $conjunction);
24
25   /**
26    * Instantiates an aggregation query object for a given entity type.
27    *
28    * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
29    *   The entity type definition.
30    * @param string $conjunction
31    *   - AND: all of the conditions on the query need to match.
32    *   - OR: at least one of the conditions on the query need to match.
33    *
34    * @return \Drupal\Core\Entity\Query\QueryAggregateInterface
35    *   The query object that can query the given entity type.
36    *
37    * @throws \Drupal\Core\Entity\Query\QueryException
38    */
39   public function getAggregate(EntityTypeInterface $entity_type, $conjunction);
40
41 }