You are here

function private_views_data in Private 7

Same name and namespace in other branches
  1. 8.2 private.views.inc \private_views_data()
  2. 6 private.views.inc \private_views_data()
  3. 7.2 private.views.inc \private_views_data()

Implements hook_views_data().

File

./private.views.inc, line 11
Views integration functions for the private module.

Code

function private_views_data() {
  $data = array();
  $data['private']['table']['group'] = t('Content');
  $data['private']['table']['join'] = array(
    'node' => array(
      'left_field' => 'nid',
      'field' => 'nid',
    ),
    'private' => array(
      'left_field' => 'nid',
      'field' => 'nid',
    ),
  );
  $data['private']['private'] = array(
    'title' => t('Private'),
    'help' => t('Whether or not the node is private.'),
    'field' => array(
      'handler' => 'views_handler_field_boolean',
      'click sortable' => TRUE,
    ),
    'filter' => array(
      'handler' => 'private_handler_filter_private',
      'label' => t('Private'),
      'type' => 'yes-no',
    ),
  );
  return $data;
}