3 namespace Drupal\Core\Entity\Query;
6 * Defines the entity query condition interface.
8 interface ConditionInterface {
11 * Gets the current conjunction.
16 public function getConjunction();
19 * Implements \Countable::count().
21 * Returns the size of this conditional. The size of the conditional is the
22 * size of its conditional array minus one, because one element is the
25 public function count();
30 * @param string|\Drupal\Core\Entity\Query\ConditionInterface $field
32 * @param string $operator
33 * @param string $langcode
34 * @return ConditionInterface
35 * @see \Drupal\Core\Entity\Query\QueryInterface::condition()
37 public function condition($field, $value = NULL, $operator = NULL, $langcode = NULL);
40 * Queries for the existence of a field.
43 * @param string $langcode
44 * @return ConditionInterface
45 * @see \Drupal\Core\Entity\Query\QueryInterface::exists()
47 public function exists($field, $langcode = NULL);
50 * Queries for the existence of a field.
52 * @param string $field
53 * @return ConditionInterface
54 * @see \Drupal\Core\Entity\Query\QueryInterface::notexists()
56 public function notExists($field, $langcode = NULL);
59 * Gets a complete list of all conditions in this conditional clause.
61 * This method returns by reference. That allows alter hooks to access the
62 * data structure directly and manipulate it before it gets compiled.
66 public function &conditions();
69 * Compiles this conditional clause.
72 * The query object this conditional clause belongs to.
74 public function compile($query);