function GroupByNumeric::query
Called to add the field to a query.
Overrides SortPluginBase::query
File
-
core/
modules/ views/ src/ Plugin/ views/ sort/ GroupByNumeric.php, line 36
Class
- GroupByNumeric
- Handler for GROUP BY on simple numeric fields.
Namespace
Drupal\views\Plugin\views\sortCode
public function query() {
$this->ensureMyTable();
$params = [
'function' => $this->options['group_type'],
];
$this->query
->addOrderBy($this->tableAlias, $this->realField, $this->options['order'], NULL, $params);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.