12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <?php
- /**
- * Implements hook_views_data().
- */
- function tripal_ds_views_data() {
- $data = array();
- $data['tripal_ds']['table']['group'] = t('Tripal Panes');
- $data['tripal_ds']['table']['base'] = array(
- 'title' => t('Tripal Panes'),
- 'help' => t('Contains Tripal Pane records we want exposed to Views.'),
- );
- $data['tripal_ds']['bundle'] = array(
- 'title' => t('Bundle ID'),
- 'help' => t('This the unque bundle name, eg bio_data_1.'),
- 'relationship' => array(
- 'base' => 'tripal_entity', // The name of the table to join with.
- 'base field' => 'bundle', // The name of the field on the joined table.
- 'handler' => 'views_handler_relationship',
- 'label' => t('Bundle relationship with tripal_entity table'),
- 'title' => t('Bundle and tripal_entity relationship'),
- 'help' => t('This relationship links the tripal_ds table with the tripal_entity table via the bundle.'),
- ),
- 'filter' => array(
- 'handler' => 'views_handler_filter_bundle',
- ),
- 'argument' => array(
- 'handler' => 'views_handler_argument_string',
- ),
- 'field' => array(
- 'handler' => 'views_handler_field',
- ),
- );
- $data['tripal_ds']['tripal_ds_field_name'] = array(
- 'title' => t('Field Name'),
- 'help' => t('This the field name, it is not necessarily unique, like "summary" which might feature across several bundles.'),
- 'field' => array(
- 'handler' => 'views_handler_field',
- 'click sortable' => TRUE, // This is use by the table display plugin.
- ),
- 'sort' => array(
- 'handler' => 'views_handler_sort',
- ),
- 'filter' => array(
- 'handler' => 'views_handler_filter_string',
- ),
- 'argument' => array(
- 'handler' => 'views_handler_argument_string',
- ),
- );
- $data['tripal_ds']['tripal_ds_field_label'] = array(
- 'title' => t('Field Label'),
- 'help' => t('The human readable name of the field, like "Data Sequences".'),
- 'field' => array(
- 'handler' => 'views_handler_field',
- 'click sortable' => TRUE, // This is use by the table display plugin.
- ),
- 'sort' => array(
- 'handler' => 'views_handler_sort',
- ),
- 'filter' => array(
- 'handler' => 'views_handler_filter_string',
- ),
- 'argument' => array(
- 'handler' => 'views_handler_argument_string',
- ),
- );
- return $data;
- }
|