| 1 |
<?php
|
| 2 |
// $Id$
|
| 3 |
|
| 4 |
/**
|
| 5 |
* Implementation of hook_views_data()
|
| 6 |
*/
|
| 7 |
function forward_views_data() {
|
| 8 |
// Basic table information.
|
| 9 |
|
| 10 |
// Define the base group of this table. Fields that don't
|
| 11 |
// have a group defined will go into this field by default.
|
| 12 |
$data['forward_statistics']['table'] = array(
|
| 13 |
'group' => t('Forward'),
|
| 14 |
);
|
| 15 |
|
| 16 |
// For other base tables, explain how we join
|
| 17 |
$data['forward_statistics']['table']['join']['node'] = array(
|
| 18 |
'left_field' => 'nid',
|
| 19 |
'field' => 'nid',
|
| 20 |
);
|
| 21 |
|
| 22 |
// Fields
|
| 23 |
$data['forward_statistics']['forward_count'] = array(
|
| 24 |
'title' => t('forward count'),
|
| 25 |
'help' => t('The module that associated a product with the node.'),
|
| 26 |
'field' => array('handler' => 'views_handler_field_numeric',),
|
| 27 |
'filter' => array('handler' => 'views_handler_filter_numeric',),
|
| 28 |
'sort' => array('handler' => 'views_handler_sort',),
|
| 29 |
);
|
| 30 |
$data['forward_statistics']['clickthrough_count'] = array(
|
| 31 |
'title' => t('clickthrough count'),
|
| 32 |
'help' => t('The module that associated a product with the node.'),
|
| 33 |
'field' => array('handler' => 'views_handler_field_numeric',),
|
| 34 |
'filter' => array('handler' => 'views_handler_filter_numeric',),
|
| 35 |
'sort' => array('handler' => 'views_handler_sort',),
|
| 36 |
);
|
| 37 |
$data['forward_statistics']['last_forward_timestamp'] = array(
|
| 38 |
'title' => t('most recent timestamp'),
|
| 39 |
'help' => t('The module that associated a product with the node.'),
|
| 40 |
'field' => array('handler' => 'views_handler_field_date',),
|
| 41 |
'filter' => array('handler' => 'views_handler_filter_timestamp',),
|
| 42 |
'sort' => array('handler' => 'views_handler_sort_date',),
|
| 43 |
);
|
| 44 |
|
| 45 |
return $data;
|
| 46 |
}
|
| 47 |
|