GroupByNumeric.php in Zircon Profile 8
File
core/modules/views/src/Plugin/views/sort/GroupByNumeric.php
View source
<?php
namespace Drupal\views\Plugin\views\sort;
use Drupal\views\Plugin\views\display\DisplayPluginBase;
use Drupal\views\ViewExecutable;
use Drupal\views\Views;
class GroupByNumeric extends SortPluginBase {
public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {
parent::init($view, $display, $options);
$this->handler = Views::handlerManager('sort')
->getHandler($options);
$this->handler
->init($view, $display, $options);
}
public function query() {
$this
->ensureMyTable();
$params = array(
'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));
}
}