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.
24 public function count();
29 * @param string|\Drupal\Core\Entity\Query\ConditionInterface $field
31 * @param string $operator
32 * @param string $langcode
33 * @return ConditionInterface
34 * @see \Drupal\Core\Entity\Query\QueryInterface::condition()
36 public function condition($field, $value = NULL, $operator = NULL, $langcode = NULL);
39 * Queries for the existence of a field.
42 * @param string $langcode
43 * @return ConditionInterface
44 * @see \Drupal\Core\Entity\Query\QueryInterface::exists()
46 public function exists($field, $langcode = NULL);
49 * Queries for the existence of a field.
51 * @param string $field
52 * @return ConditionInterface
53 * @see \Drupal\Core\Entity\Query\QueryInterface::notExists()
55 public function notExists($field, $langcode = NULL);
58 * Gets a complete list of all conditions in this conditional clause.
60 * This method returns by reference. That allows alter hooks to access the
61 * data structure directly and manipulate it before it gets compiled.
65 public function &conditions();
68 * Compiles this conditional clause.
71 * The query object this conditional clause belongs to.
73 public function compile($query);