function ConditionAggregateBase::condition
Adds a condition.
Parameters
string|ConditionAggregateInterface $field: The field.
string $function: (optional) The function.
mixed $value: (optional) The value.
string $operator: (optional) The operator.
string $langcode: (optional) For which language the entity should be prepared, defaults to the current content language.
Return value
$this The called object.
Overrides ConditionAggregateInterface::condition
2 calls to ConditionAggregateBase::condition()
- ConditionAggregate::exists in core/lib/ Drupal/ Core/ Entity/ Query/ Sql/ ConditionAggregate.php 
- Queries for the existence of a field.
- ConditionAggregate::notExists in core/lib/ Drupal/ Core/ Entity/ Query/ Sql/ ConditionAggregate.php 
- Queries for the nonexistence of a field.
File
- 
              core/lib/ Drupal/ Core/ Entity/ Query/ ConditionAggregateBase.php, line 13 
Class
- ConditionAggregateBase
- Defines a common base class for all aggregation entity condition implementations.
Namespace
Drupal\Core\Entity\QueryCode
public function condition($field, $function = NULL, $value = NULL, $operator = NULL, $langcode = NULL) {
  $this->conditions[] = [
    'field' => $field,
    'function' => $function,
    '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.
