function GroupByNumeric::query

Set up the query for this argument.

The argument sent may be found at $this->argument.

Overrides ArgumentPluginBase::query

File

core/modules/views/src/Plugin/views/argument/GroupByNumeric.php, line 17

Class

GroupByNumeric
Simple handler for arguments using group by.

Namespace

Drupal\views\Plugin\views\argument

Code

public function query($group_by = FALSE) {
  $this->ensureMyTable();
  $field = $this->getField();
  $placeholder = $this->placeholder();
  $this->query
    ->addHavingExpression(0, "{$field} = {$placeholder}", [
    $placeholder => $this->argument,
  ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.