GroupByNumeric.php in Zircon Profile 8
File
core/modules/views/src/Plugin/views/argument/GroupByNumeric.php
View source
<?php
namespace Drupal\views\Plugin\views\argument;
class GroupByNumeric extends ArgumentPluginBase {
public function query($group_by = FALSE) {
$this
->ensureMyTable();
$field = $this
->getField();
$placeholder = $this
->placeholder();
$this->query
->addHavingExpression(0, "{$field} = {$placeholder}", array(
$placeholder => $this->argument,
));
}
public function adminLabel($short = FALSE) {
return $this
->getField(parent::adminLabel($short));
}
public function getSortName() {
return $this
->t('Numerical', array(), array(
'context' => 'Sort order',
));
}
}