stableversion-3.0
Last change
on this file since 65dadeb was
65dadeb,
checked in by José Gregorio Puentes <jpuentes@…>, 8 años ago
|
se agregaron los archivos de la nueva version del modulo
|
-
Propiedad mode establecida a
100644
|
File size:
812 octetos
|
Línea | |
---|
1 | <?php |
---|
2 | /** |
---|
3 | * Handler for GROUP BY on simple numeric fields. |
---|
4 | * |
---|
5 | * @ingroup views_sort_handlers |
---|
6 | */ |
---|
7 | class views_handler_sort_group_by_numeric extends views_handler_sort { |
---|
8 | function init(&$view, $options) { |
---|
9 | parent::init($view, $options); |
---|
10 | |
---|
11 | // Initialize the original handler. |
---|
12 | $this->handler = views_get_handler($options['table'], $options['field'], 'sort'); |
---|
13 | $this->handler->init($view, $options); |
---|
14 | } |
---|
15 | |
---|
16 | /** |
---|
17 | * Called to add the field to a query. |
---|
18 | */ |
---|
19 | function query() { |
---|
20 | $this->ensure_my_table(); |
---|
21 | |
---|
22 | $params = array( |
---|
23 | 'function' => $this->options['group_type'], |
---|
24 | ); |
---|
25 | |
---|
26 | $this->query->add_orderby($this->table_alias, $this->real_field, $this->options['order'], NULL, $params); |
---|
27 | } |
---|
28 | |
---|
29 | function ui_name($short = FALSE) { |
---|
30 | return $this->get_field(parent::ui_name($short)); |
---|
31 | } |
---|
32 | } |
---|
Nota: Vea
TracBrowser
para ayuda de uso del navegador del repositorio.