interface ConditionInterface
Same name in this branch
- 8.9.x core/lib/Drupal/Core/Database/Query/ConditionInterface.php \Drupal\Core\Database\Query\ConditionInterface
- 8.9.x core/lib/Drupal/Core/Condition/ConditionInterface.php \Drupal\Core\Condition\ConditionInterface
Same name in other branches
- 9 core/lib/Drupal/Core/Database/Query/ConditionInterface.php \Drupal\Core\Database\Query\ConditionInterface
- 9 core/lib/Drupal/Core/Entity/Query/ConditionInterface.php \Drupal\Core\Entity\Query\ConditionInterface
- 9 core/lib/Drupal/Core/Condition/ConditionInterface.php \Drupal\Core\Condition\ConditionInterface
- 10 core/lib/Drupal/Core/Database/Query/ConditionInterface.php \Drupal\Core\Database\Query\ConditionInterface
- 10 core/lib/Drupal/Core/Entity/Query/ConditionInterface.php \Drupal\Core\Entity\Query\ConditionInterface
- 10 core/lib/Drupal/Core/Condition/ConditionInterface.php \Drupal\Core\Condition\ConditionInterface
- 11.x core/lib/Drupal/Core/Database/Query/ConditionInterface.php \Drupal\Core\Database\Query\ConditionInterface
- 11.x core/lib/Drupal/Core/Entity/Query/ConditionInterface.php \Drupal\Core\Entity\Query\ConditionInterface
- 11.x core/lib/Drupal/Core/Condition/ConditionInterface.php \Drupal\Core\Condition\ConditionInterface
Defines the entity query condition interface.
Hierarchy
- interface \Drupal\Core\Entity\Query\ConditionInterface
Expanded class hierarchy of ConditionInterface
All classes that implement ConditionInterface
2 files declare their use of ConditionInterface
- Condition.php in core/
lib/ Drupal/ Core/ Config/ Entity/ Query/ Condition.php - Condition.php in core/
lib/ Drupal/ Core/ Entity/ Query/ Sql/ Condition.php
File
-
core/
lib/ Drupal/ Core/ Entity/ Query/ ConditionInterface.php, line 8
Namespace
Drupal\Core\Entity\QueryView source
interface ConditionInterface {
/**
* Gets the current conjunction.
*
* @return string
* Can be AND or OR.
*/
public function getConjunction();
/**
* Implements \Countable::count().
*
* Returns the size of this conditional. The size of the conditional is the
* size of its conditional array.
*/
public function count();
/**
* Adds a condition.
*
* @param string|\Drupal\Core\Entity\Query\ConditionInterface $field
* @param mixed $value
* @param string $operator
* @param string $langcode
*
* @return $this
*
* @see \Drupal\Core\Entity\Query\QueryInterface::condition()
*/
public function condition($field, $value = NULL, $operator = NULL, $langcode = NULL);
/**
* Queries for the existence of a field.
*
* @param string $field
* @param string $langcode
*
* @return $this
*
* @see \Drupal\Core\Entity\Query\QueryInterface::exists()
*/
public function exists($field, $langcode = NULL);
/**
* Queries for the nonexistence of a field.
*
* @param string $field
* @param string $langcode
*
* @return $this
*
* @see \Drupal\Core\Entity\Query\QueryInterface::notExists()
*/
public function notExists($field, $langcode = NULL);
/**
* Gets a complete list of all conditions in this conditional clause.
*
* This method returns by reference. That allows alter hooks to access the
* data structure directly and manipulate it before it gets compiled.
*
* @return array
*/
public function &conditions();
/**
* Compiles this conditional clause.
*
* @param $query
* The query object this conditional clause belongs to.
*/
public function compile($query);
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
ConditionInterface::compile | public | function | Compiles this conditional clause. | 3 |
ConditionInterface::condition | public | function | Adds a condition. | 1 |
ConditionInterface::conditions | public | function | Gets a complete list of all conditions in this conditional clause. | |
ConditionInterface::count | public | function | Implements \Countable::count(). | |
ConditionInterface::exists | public | function | Queries for the existence of a field. | 3 |
ConditionInterface::getConjunction | public | function | Gets the current conjunction. | |
ConditionInterface::notExists | public | function | Queries for the nonexistence of a field. | 3 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.