You are here

function flashnode_views_tables in Flash Node 5.6

Implementation of hook_views_tables

File

./flashnode.views.inc, line 6

Code

function flashnode_views_tables() {

  // Provide access to the flash content
  $tables['flashnode'] = array(
    'name' => 'flashnode',
    'join' => array(
      'left' => array(
        'table' => 'node',
        'field' => 'vid',
      ),
      'right' => array(
        'field' => 'vid',
      ),
    ),
    'fields' => array(
      'content' => array(
        'name' => t('Flash node: Content'),
        'sortable' => FALSE,
        'notafield' => TRUE,
        'option' => array(
          '#type' => 'textfield',
          '#size' => 10,
        ),
        'handler' => 'flashnode_views_handler_field_content',
        'help' => t('Display the flash content from this node. You can pass options using the flash node input filter syntax.'),
      ),
    ),
  );

  // Provide access to the flash file data
  $tables['flashnode_filename'] = array(
    'name' => 'files',
    'join' => array(
      'left' => array(
        'table' => 'flashnode',
        'field' => 'fid',
      ),
      'right' => array(
        'field' => 'fid',
      ),
    ),
    'fields' => array(
      'filepath' => array(
        'name' => t('Flash node: Path'),
        'sortable' => TRUE,
        'help' => t('Display the file path for the flash content from this node.'),
      ),
    ),
    'filters' => array(
      'filepath' => array(
        'name' => t('Flash node: Path'),
        'operator' => 'views_handler_operator_like',
        'handler' => 'views_handler_filter_like',
        'help' => t('Filter based on the flash node file path.'),
      ),
    ),
  );
  return $tables;
}