• Main Page
  • Related Pages
  • Modules
  • Classes
  • Files
  • File List
  • File Members

modules/poll.views.inc

Go to the documentation of this file.
00001 <?php
00017 function poll_views_data() {
00018   // Basic table information.
00019   $data['poll']['table']['group']  = t('Poll');
00020 
00021   // Join to 'node' as a base table.
00022   $data['poll']['table']['join'] = array(
00023     'node' => array(
00024       'left_field' => 'nid',
00025       'field' => 'nid',
00026     ),
00027   );
00028 
00029   // ----------------------------------------------------------------
00030   // Fields
00031 
00032   // poll active status
00033   $data['poll']['active'] = array(
00034     'title' => t('Active'),
00035     'help' => t('Whether the poll is open for voting.'),
00036     'field' => array(
00037       'handler' => 'views_handler_field_boolean',
00038       'click sortable' => TRUE,
00039     ),
00040     'filter' => array(
00041       'handler' => 'views_handler_filter_boolean_operator',
00042       'label' => t('Active'),
00043       'type' => 'yes-no',
00044     ),
00045     'sort' => array(
00046       'handler' => 'views_handler_sort',
00047     ),
00048   );
00049 
00050   return $data;
00051 }
00052 

Generated on Sun Feb 26 2012 12:52:51 for Views by  doxygen 1.7.1