You are here

function sgrid_views_data in Sortable Grid Views Plugin 7

Same name and namespace in other branches
  1. 6 sgrid.views.inc \sgrid_views_data()

Implements hook_views_data().

File

./sgrid.views.inc, line 40
sgrid.views.inc Views include file for Sortable Grid module

Code

function sgrid_views_data() {
  $data = array();
  $data['sgrid']['table']['group'] = t('Sortable Grid');
  $data['sgrid']['rank'] = array(
    'title' => 'Rank',
    'field' => array(
      'handler' => 'views_handler_field_numeric',
    ),
    'sort' => array(
      'handler' => 'views_handler_sort',
    ),
    'relationship' => array(
      'base' => 'node',
      'field' => 'nid',
      'handler' => 'views_handler_relationship',
      'label' => t('Ranked node'),
    ),
    'help' => 'This field is used to sort nodes based on user defined order.',
  );
  $data['sgrid']['table']['join'] = array(
    'node' => array(
      'left_field' => 'nid',
      'field' => 'nid',
    ),
  );
  return $data;
}