
| Current Path : /var/www/html1/testsite/web/core/modules/views/src/Plugin/views/argument/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html1/testsite/web/core/modules/views/src/Plugin/views/argument/GroupByNumeric.php |
<?php
namespace Drupal\views\Plugin\views\argument;
/**
* Simple handler for arguments using group by.
*
* @ingroup views_argument_handlers
*
* @ViewsArgument("groupby_numeric")
*/
class GroupByNumeric extends ArgumentPluginBase {
public function query($group_by = FALSE) {
$this->ensureMyTable();
$field = $this->getField();
$placeholder = $this->placeholder();
$this->query->addHavingExpression(0, "$field = $placeholder", [$placeholder => $this->argument]);
}
public function adminLabel($short = FALSE) {
return $this->getField(parent::adminLabel($short));
}
/**
* {@inheritdoc}
*/
public function getSortName() {
return $this->t('Numerical', [], ['context' => 'Sort order']);
}
}