commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-old / views / modules / poll.views.inc
1 <?php
2
3 /**
4 * @file
5 * Provide views data and handlers for poll.module.
6 *
7 * @ingroup views_module_handlers
8 */
9
10 /**
11 * Implements hook_views_data().
12 */
13 function poll_views_data() {
14 // Basic table information.
15 $data['poll']['table']['group'] = t('Poll');
16
17 // Join to 'node' as a base table.
18 $data['poll']['table']['join'] = array(
19 'node' => array(
20 'left_field' => 'nid',
21 'field' => 'nid',
22 ),
23 );
24
25 // ----------------------------------------------------------------
26 // Fields
27
28 // poll active status
29 $data['poll']['active'] = array(
30 'title' => t('Active'),
31 'help' => t('Whether the poll is open for voting.'),
32 'field' => array(
33 'handler' => 'views_handler_field_boolean',
34 'click sortable' => TRUE,
35 ),
36 'filter' => array(
37 'handler' => 'views_handler_filter_boolean_operator',
38 'label' => t('Active'),
39 'type' => 'yes-no',
40 ),
41 'sort' => array(
42 'handler' => 'views_handler_sort',
43 ),
44 );
45
46 return $data;
47 }