You are here

function sheetnode_views_data in Sheetnode 6

Same name and namespace in other branches
  1. 7.2 sheetnode.views.inc \sheetnode_views_data()
  2. 7 sheetnode.views.inc \sheetnode_views_data()

Implementation of hook_views_data().

File

./sheetnode.views.inc, line 75

Code

function sheetnode_views_data() {

  // Basic table information.
  $data['sheetnode']['table']['group'] = t('Sheetnode');

  // Explain how we join.
  $data['sheetnode']['table']['join'] = array(
    // Directly links to node table.
    'node' => array(
      'left_field' => 'vid',
      'field' => 'vid',
    ),
  );

  // Sheetnode field.
  $data['sheetnode']['content'] = array(
    'title' => t('Content'),
    'help' => t('The raw content of the sheetnode.'),
    'field' => array(
      'field' => 'value',
      'handler' => 'views_handler_field',
    ),
  );

  // Cell field.
  $data['sheetnode']['cell'] = array(
    'title' => t('Cell'),
    'help' => t('The value stored in a specific sheetnode cell.'),
    'field' => array(
      'field' => 'value',
      'handler' => 'sheetnode_handler_field_cell',
    ),
  );

  // Range field.
  $data['sheetnode']['range'] = array(
    'title' => t('Range'),
    'help' => t('The values stored in a range of cells, including whole columns or whole rows.'),
    'field' => array(
      'field' => 'value',
      'handler' => 'sheetnode_handler_field_range',
    ),
  );

  // Variable name.
  $data['sheetnode']['named_range'] = array(
    'title' => t('Named range'),
    'help' => t('The cell or range values referred to by a named variable.'),
    'field' => array(
      'field' => 'value',
      'handler' => 'sheetnode_handler_field_named_range',
    ),
  );
  return $data;
}