You are here

function rotor_views_data in Rotor Banner 6.2

Same name and namespace in other branches
  1. 7 views/rotor.views.inc \rotor_views_data()

Implementation of hook_views_data().

Exposes all fields to the views system.

File

views/rotor.views.inc, line 69
Rotor views integration.

Code

function rotor_views_data() {
  $data = array();
  $data['rotor_item']['table']['group'] = t('Content');
  $data['rotor_item']['table']['join'] = array(
    'node' => array(
      'left_field' => 'nid',
      'field' => 'nid',
    ),
    'files' => array(
      'left_field' => 'fid',
      'field' => 'fid',
    ),
  );
  $data['rotor_item']['rotor_item_image'] = array(
    'title' => t('Rotor Item image'),
    'real field' => 'nid',
    'help' => t('Add a Rotor Item image as a field to this view.'),
    'field' => array(
      'handler' => 'views_field_handler_rotor_image',
      'click sortable' => FALSE,
    ),
  );
  $data['rotor_item']['rotor_item_url'] = array(
    'title' => t('Rotor Item link'),
    'real field' => 'url',
    'help' => t('Add a Rotor Item link as a field to this view.'),
    'field' => array(
      'handler' => 'views_handler_field_url',
      'click sortable' => FALSE,
    ),
  );
  return $data;
}