5 * Definition of views_handler_sort_group_by_numeric.
9 * Handler for GROUP BY on simple numeric fields.
11 * @ingroup views_sort_handlers
13 class views_handler_sort_group_by_numeric extends views_handler_sort {
14 function init(&$view, &$options) {
15 parent::init($view, $options);
17 // Initialize the original handler.
18 $this->handler = views_get_handler($options['table'], $options['field'], 'sort');
19 $this->handler->init($view, $options);
23 * Called to add the field to a query.
26 $this->ensure_my_table();
29 'function' => $this->options['group_type'],
32 $this->query->add_orderby($this->table_alias, $this->real_field, $this->options['order'], NULL, $params);
35 function ui_name($short = FALSE) {
36 return $this->get_field(parent::ui_name($short));