You are here

function views_xml_backend_views_data in Views XML Backend 6

Same name and namespace in other branches
  1. 8 views_xml_backend.views.inc \views_xml_backend_views_data()
  2. 7 views_xml_backend.views.inc \views_xml_backend_views_data()

Implementation of hook_views_data().

File

./views_xml_backend.views.inc, line 10
Views hooks for views_xml_backend.

Code

function views_xml_backend_views_data() {
  $data = array();
  $data['xml']['table']['group'] = t('XML');
  $data['xml']['table']['base'] = array(
    'title' => t('XML'),
    'help' => t('Queries an XML file.'),
    'query class' => 'views_xml_backend',
    'field' => 'text',
  );
  $data['xml']['text'] = array(
    'title' => t('Text'),
    'help' => t('Text in the XML file.'),
    'field' => array(
      'handler' => 'views_xml_backend_handler_field',
      'click sortable' => TRUE,
    ),
    'filter' => array(
      'handler' => 'views_xml_backend_handler_filter',
    ),
    'sort' => array(
      'handler' => 'views_xml_backend_handler_sort',
    ),
  );
  $data['xml']['date'] = array(
    'title' => t('Date'),
    'help' => t('Date in the XML file.'),
    'field' => array(
      'handler' => 'views_xml_backend_handler_field_date',
      'click sortable' => FALSE,
    ),
  );
  $data['xml']['numeric'] = array(
    'title' => t('Numeric'),
    'help' => t('A number in the XML file.'),
    //'field' => array(

    //  'handler' => 'views_xml_backend_handler_field',

    //),
    'filter' => array(
      'handler' => 'views_xml_backend_handler_filter_numeric',
    ),
    'sort' => array(
      'handler' => 'views_xml_backend_handler_sort_numeric',
    ),
  );
  $data['xml']['markup'] = array(
    'title' => t('Markup'),
    'help' => t('HTML markup in the XML file.'),
    'field' => array(
      'handler' => 'views_xml_backend_handler_field_markup',
    ),
  );
  return $data;
}