3 namespace Drupal\views\Plugin\views\argument;
6 * Simple handler for arguments using group by.
8 * @ingroup views_argument_handlers
10 * @ViewsArgument("groupby_numeric")
12 class GroupByNumeric extends ArgumentPluginBase {
14 public function query($group_by = FALSE) {
15 $this->ensureMyTable();
16 $field = $this->getField();
17 $placeholder = $this->placeholder();
19 $this->query->addHavingExpression(0, "$field = $placeholder", [$placeholder => $this->argument]);
22 public function adminLabel($short = FALSE) {
23 return $this->getField(parent::adminLabel($short));
29 public function getSortName() {
30 return $this->t('Numerical', [], ['context' => 'Sort order']);