class GroupByNumeric in Drupal 10
Same name in this branch
- 10 core/modules/views/src/Plugin/views/filter/GroupByNumeric.php \Drupal\views\Plugin\views\filter\GroupByNumeric
- 10 core/modules/views/src/Plugin/views/sort/GroupByNumeric.php \Drupal\views\Plugin\views\sort\GroupByNumeric
- 10 core/modules/views/src/Plugin/views/argument/GroupByNumeric.php \Drupal\views\Plugin\views\argument\GroupByNumeric
Same name and namespace in other branches
- 8 core/modules/views/src/Plugin/views/argument/GroupByNumeric.php \Drupal\views\Plugin\views\argument\GroupByNumeric
- 9 core/modules/views/src/Plugin/views/argument/GroupByNumeric.php \Drupal\views\Plugin\views\argument\GroupByNumeric
Simple handler for arguments using group by.
Plugin annotation
@ViewsArgument("groupby_numeric");
Hierarchy
- class \Drupal\views\Plugin\views\argument\GroupByNumeric extends \Drupal\views\Plugin\views\argument\ArgumentPluginBase
Expanded class hierarchy of GroupByNumeric
File
- core/
modules/ views/ src/ Plugin/ views/ argument/ GroupByNumeric.php, line 12
Namespace
Drupal\views\Plugin\views\argumentView source
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',
]);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
GroupByNumeric:: |
public | function | ||
GroupByNumeric:: |
public | function | ||
GroupByNumeric:: |
public | function |