/[drupal]/contributions/modules/views/modules/poll.views.inc
ViewVC logotype

Contents of /contributions/modules/views/modules/poll.views.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations) (download) (as text)
Wed Dec 3 19:10:21 2008 UTC (11 months, 3 weeks ago) by merlinofchaos
Branch: MAIN
CVS Tags: DRUPAL-6--2-7, DRUPAL-6--2-6, DRUPAL-6--2-5, DRUPAL-6--2-4, DRUPAL-6--2-3, DRUPAL-6--2-2, DRUPAL-6--3-0-ALPHA1, HEAD
Branch point for: DRUPAL-6--2, DRUPAL-6--3, DRUPAL-7--3
Changes since 1.3: +8 -12 lines
File MIME type: text/x-php
Remove deprecated syntax from poll.views.inc
1 <?php
2 // $Id: poll.views.inc,v 1.3 2008/11/24 19:58:31 merlinofchaos Exp $
3 /**
4 * @file
5 * Provide views data and handlers for poll.module
6 */
7
8 /**
9 * @defgroup views_poll_module poll.module handlers
10 *
11 * Includes only the core 'poll' table for now.
12 * @{
13 */
14
15 /**
16 * Implementation of hook_views_data()
17 */
18 function poll_views_data() {
19 // Basic table information.
20 $data['poll']['table']['group'] = t('Poll');
21
22 // Join to 'node' as a base table.
23 $data['poll']['table']['join'] = array(
24 'node' => array(
25 'left_field' => 'nid',
26 'field' => 'nid',
27 ),
28 );
29
30 // ----------------------------------------------------------------
31 // Fields
32
33 // poll active status
34 $data['poll']['active'] = array(
35 'title' => t('Active'),
36 'help' => t('Whether the poll is open for voting.'),
37 'field' => array(
38 'handler' => 'views_handler_field_boolean',
39 'click sortable' => TRUE,
40 ),
41 'filter' => array(
42 'handler' => 'views_handler_filter_boolean_operator',
43 'label' => t('Active'),
44 'type' => 'yes-no',
45 ),
46 'sort' => array(
47 'handler' => 'views_handler_sort',
48 ),
49 );
50
51 return $data;
52 }
53
54 /**
55 * @}
56 */

  ViewVC Help
Powered by ViewVC 1.1.2