You are here

function footnotes_views_views_data in Footnotes 7.2

Same name and namespace in other branches
  1. 6.2 footnotes_views.views.inc \footnotes_views_views_data()
  2. 7.3 footnotes_views.views.inc \footnotes_views_views_data()

Implementation of hook_views_data().

File

./footnotes_views.views.inc, line 30
To do views declarations.

Code

function footnotes_views_views_data() {
  $data = array();

  // node view extensions
  $data['node_revisions']['body_content'] = array(
    'group' => t('Node'),
    'title' => t('Body content'),
    'help' => t('The content of the body without the footnotes.'),
    'field' => array(
      'field' => 'body',
      'handler' => 'footnotes_views_handler_field_body_content',
      'format' => 'format',
    ),
    'filter' => array(
      'handler' => 'views_handler_filter_string',
    ),
  );
  $data['node_revisions']['body_footnotes'] = array(
    'group' => t('Node'),
    'title' => t('Body footnotes'),
    'help' => t('The footnotes alone, without body.'),
    'field' => array(
      'field' => 'body',
      'handler' => 'footnotes_views_handler_field_body_footnotes',
      'format' => 'format',
    ),
    'filter' => array(
      'handler' => 'views_handler_filter_string',
    ),
  );
  $data['node_revisions']['teaser_content'] = array(
    'group' => t('Node'),
    'title' => t('Teaser content'),
    'help' => t('The content of the teaser without the footnotes.'),
    'field' => array(
      'field' => 'teaser',
      'handler' => 'footnotes_views_handler_field_body_content',
      'format' => 'format',
    ),
    'filter' => array(
      'handler' => 'views_handler_filter_string',
    ),
  );
  $data['node_revisions']['teaser_footnotes'] = array(
    'group' => t('Node'),
    'title' => t('Teaser footnotes'),
    'help' => t('The footnotes alone, without the teaser.'),
    'field' => array(
      'field' => 'teaser',
      'handler' => 'footnotes_views_handler_field_body_footnotes',
      'format' => 'format',
    ),
    'filter' => array(
      'handler' => 'views_handler_filter_string',
    ),
  );
  return $data;
}