class GroupByNumeric
Same name in this branch
- 9 core/modules/views/src/Plugin/views/filter/GroupByNumeric.php \Drupal\views\Plugin\views\filter\GroupByNumeric
- 9 core/modules/views/src/Plugin/views/argument/GroupByNumeric.php \Drupal\views\Plugin\views\argument\GroupByNumeric
Same name and namespace in other branches
- 11.x core/modules/views/src/Plugin/views/sort/GroupByNumeric.php \Drupal\views\Plugin\views\sort\GroupByNumeric
- 11.x core/modules/views/src/Plugin/views/filter/GroupByNumeric.php \Drupal\views\Plugin\views\filter\GroupByNumeric
- 11.x core/modules/views/src/Plugin/views/argument/GroupByNumeric.php \Drupal\views\Plugin\views\argument\GroupByNumeric
Handler for GROUP BY on simple numeric fields.
Plugin annotation
@ViewsSort("groupby_numeric");
Hierarchy
- class \Drupal\Component\Plugin\PluginBase extends \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait implements \Drupal\Component\Plugin\PluginBase
- class \Drupal\views\Plugin\views\PluginBase extends \Drupal\Core\Plugin\ContainerFactoryPluginInterface, \Drupal\views\Plugin\views\ViewsPluginInterface, \Drupal\Component\Plugin\DependentPluginInterface, \Drupal\Core\Security\TrustedCallbackInterface implements \Drupal\Core\Plugin\PluginBase
- class \Drupal\views\Plugin\views\HandlerBase extends \Drupal\views\Plugin\views\ViewsHandlerInterface implements \Drupal\views\Plugin\views\PluginBase
- class \Drupal\views\Plugin\views\sort\SortPluginBase extends \Drupal\Core\Cache\CacheableDependencyInterface implements \Drupal\views\Plugin\views\HandlerBase
- class \Drupal\views\Plugin\views\sort\GroupByNumeric implements \Drupal\views\Plugin\views\sort\SortPluginBase
- class \Drupal\views\Plugin\views\sort\SortPluginBase extends \Drupal\Core\Cache\CacheableDependencyInterface implements \Drupal\views\Plugin\views\HandlerBase
- class \Drupal\views\Plugin\views\HandlerBase extends \Drupal\views\Plugin\views\ViewsHandlerInterface implements \Drupal\views\Plugin\views\PluginBase
- class \Drupal\views\Plugin\views\PluginBase extends \Drupal\Core\Plugin\ContainerFactoryPluginInterface, \Drupal\views\Plugin\views\ViewsPluginInterface, \Drupal\Component\Plugin\DependentPluginInterface, \Drupal\Core\Security\TrustedCallbackInterface implements \Drupal\Core\Plugin\PluginBase
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait implements \Drupal\Component\Plugin\PluginBase
Expanded class hierarchy of GroupByNumeric
File
-
core/
modules/ views/ src/ Plugin/ views/ sort/ GroupByNumeric.php, line 14
Namespace
Drupal\views\Plugin\views\sortView source
class GroupByNumeric extends SortPluginBase {
/**
* The original handler.
*/
protected $handler;
/**
* {@inheritdoc}
*/
public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {
parent::init($view, $display, $options);
// Initialize the original handler.
$this->handler = Views::handlerManager('sort')->getHandler($options);
$this->handler
->init($view, $display, $options);
}
/**
* Called to add the field to a query.
*/
public function query() {
$this->ensureMyTable();
$params = [
'function' => $this->options['group_type'],
];
$this->query
->addOrderBy($this->tableAlias, $this->realField, $this->options['order'], NULL, $params);
}
public function adminLabel($short = FALSE) {
return $this->getField(parent::adminLabel($short));
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.