| Commit | Line | Data |
|---|---|---|
| 0e64b897 IN |
1 | <?php |
| 2 | ||
| 5ca7143a IN |
3 | |
| 4 | /** @file | |
| 5 | * Group By Views2 Include File | |
| 6 | */ | |
| 7 | ||
| 8 | ||
| 0e64b897 IN |
9 | /** |
| 10 | * Implementation of hook_views_data() | |
| 11 | */ | |
| 12 | function views_groupby_views_data() { | |
| 13 | ||
| 14 | $data = array(); | |
| 15 | ||
| 16 | $data['views_groupby']['table']['group'] = t('SQL Aggregation'); | |
| 17 | $data['views_groupby']['table']['join'] = array( | |
| 18 | '#global' => array(), | |
| 19 | ); | |
| 20 | ||
| 21 | $data['views_groupby']['views_sql_groupedfields'] = array( | |
| 22 | 'title' => t('Group By Fields'), | |
| 23 | 'help' => t('Select Fields to Group On'), | |
| 24 | 'field' => array( | |
| 25 | 'handler' => 'views_groupby_handler_field_groupfields', | |
| 26 | ) | |
| 27 | ); | |
| 28 | ||
| 29 | ||
| 30 | ||
| 31 | return $data; | |
| 32 | } | |
| 33 | ||
| 34 | ||
| 35 | /** | |
| 36 | * Implementation of hook_views_handlers(). | |
| 37 | */ | |
| 38 | function views_groupby_views_handlers() { | |
| 39 | return array( | |
| 40 | 'info' => array( | |
| 41 | 'path' => drupal_get_path('module', 'views_groupby') . '/handlers', | |
| 42 | ), | |
| 43 | 'handlers' => array( | |
| 44 | // field | |
| 45 | 'views_groupby_handler_field_groupfields' => array( | |
| 46 | 'parent' => 'views_handler_field', | |
| 47 | ) | |
| 48 | ), | |
| 49 | ); | |
| 50 | } |