poll.views.inc

  1. cis7 sites/all/modules/ulmus/views/modules/poll.views.inc
  2. cle7 sites/all/modules/ulmus/views/modules/poll.views.inc
  3. ecd7 sites/all/modules/ulmus/views/modules/poll.views.inc
  4. elmsmedia7 sites/all/modules/ulmus/views/modules/poll.views.inc
  5. harmony7 sites/all/modules/ulmus/views/modules/poll.views.inc
  6. icor7 sites/all/modules/ulmus/views/modules/poll.views.inc
  7. meedjum_blog7 sites/all/modules/ulmus/views/modules/poll.views.inc
  8. mooc7 sites/all/modules/ulmus/views/modules/poll.views.inc

Provide views data and handlers for poll.module.

Functions

Namesort descending Description
poll_views_data Implements hook_views_data().

File

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

Related topics