public function QueryBase::conditionAggregate
public QueryBase::conditionAggregate($field, $function = NULL, $value = NULL, $operator = '=', $langcode = NULL)
Sets a condition for an aggregated value.
Parameters
string $field: The name of the field to aggregate by.
string $function: The aggregation function, for example COUNT or MIN.
mixed $value: The actual value of the field.
$operator: Possible values:
- '=', '<>', '>', '>=', '<', '<=', 'STARTS_WITH', 'CONTAINS', 'ENDS_WITH': These operators expect $value to be a literal of the same type as the column.
- 'IN', 'NOT IN': These operators expect $value to be an array of literals of the same type as the column.
- 'BETWEEN': This operator expects $value to be an array of two literals of the same type as the column.
string $langcode: (optional) The language code.
Return value
\Drupal\Core\Entity\Query\QueryAggregateInterface The called object.
Overrides QueryAggregateInterface::conditionAggregate
See also
\Drupal\Core\Entity\Query\QueryInterface::condition()
File
- core/lib/Drupal/Core/Entity/Query/QueryBase.php, line 397
Class
- QueryBase
- The base entity query class.
Namespace
Drupal\Core\Entity\QueryCode
public function conditionAggregate($field, $function = NULL, $value = NULL, $operator = '=', $langcode = NULL) { $this->aggregate($field, $function, $langcode); $this->conditionAggregate->condition($field, $function, $value, $operator, $langcode); return $this; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!Query!QueryBase.php/function/QueryBase::conditionAggregate/8.1.x