history.views.inc

Provide views data and handlers for history.module.

File

drupal/core/modules/history/history.views.inc
View source
  1. <?php
  2. /**
  3. * @file
  4. * Provide views data and handlers for history.module.
  5. *
  6. * @ingroup views_module_handlers
  7. */
  8. /**
  9. * Implements hook_views_data().
  10. */
  11. function history_views_data() {
  12. // History table
  13. // We're actually defining a specific instance of the table, so let's
  14. // alias it so that we can later add the real table for other purposes if we
  15. // need it.
  16. $data['history']['table']['group'] = t('Content');
  17. // Explain how this table joins to others.
  18. $data['history']['table']['join'] = array(
  19. // Directly links to node table.
  20. 'node' => array(
  21. 'table' => 'history',
  22. 'left_field' => 'nid',
  23. 'field' => 'nid',
  24. 'extra' => array(
  25. array('field' => 'uid', 'value' => '***CURRENT_USER***', 'numeric' => TRUE),
  26. ),
  27. ),
  28. );
  29. $data['history']['timestamp'] = array(
  30. 'title' => t('Has new content'),
  31. 'field' => array(
  32. 'id' => 'history_user_timestamp',
  33. 'help' => t('Show a marker if the content is new or updated.'),
  34. ),
  35. 'filter' => array(
  36. 'help' => t('Show only content that is new or updated.'),
  37. 'id' => 'history_user_timestamp',
  38. ),
  39. );
  40. return $data;
  41. }

Related topics

Functions

Namesort descending Description
history_views_data Implements hook_views_data().