function ConditionBase::condition
Same name in other branches
- 9 core/lib/Drupal/Core/Entity/Query/ConditionBase.php \Drupal\Core\Entity\Query\ConditionBase::condition()
- 8.9.x core/lib/Drupal/Core/Entity/Query/ConditionBase.php \Drupal\Core\Entity\Query\ConditionBase::condition()
- 11.x core/lib/Drupal/Core/Entity/Query/ConditionBase.php \Drupal\Core\Entity\Query\ConditionBase::condition()
Overrides ConditionInterface::condition
6 calls to ConditionBase::condition()
- Condition::exists in core/
lib/ Drupal/ Core/ Config/ Entity/ Query/ Condition.php - Queries for the existence of a field.
- Condition::exists in core/
lib/ Drupal/ Core/ Entity/ Query/ Sql/ Condition.php - Queries for the existence of a field.
- Condition::exists in core/
lib/ Drupal/ Core/ Entity/ Query/ Null/ Condition.php - Queries for the existence of a field.
- Condition::notExists in core/
lib/ Drupal/ Core/ Config/ Entity/ Query/ Condition.php - Queries for the nonexistence of a field.
- Condition::notExists in core/
lib/ Drupal/ Core/ Entity/ Query/ Sql/ Condition.php - Queries for the nonexistence of a field.
File
-
core/
lib/ Drupal/ Core/ Entity/ Query/ ConditionBase.php, line 13
Class
- ConditionBase
- Defines a common base class for all entity condition implementations.
Namespace
Drupal\Core\Entity\QueryCode
public function condition($field, $value = NULL, $operator = NULL, $langcode = NULL) {
$this->conditions[] = [
'field' => $field,
'value' => $value,
'operator' => $operator,
'langcode' => $langcode,
];
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.