123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409 |
- <?php
- function tripal_views_TEMPORARY_chado_linking_data($data) {
- global $db_url;
-
-
-
- if (is_array($db_url) and array_key_exists('chado', $db_url)) {
-
- return $data;
- }
-
- if (module_exists('tripal_feature')) {
-
- $data['chado_feature']['table'] = array(
- 'field' => 'nid',
- 'group' => 'Chado Feature'
- );
- $data['chado_feature']['nid'] = array(
- 'title' => t('Feature Node ID'),
- 'help' => t('The node ID for this feature'),
- 'field' => array(
- 'handler' => 'views_handler_field_numeric',
- 'click sortable' => TRUE,
- ),
- 'filter' => array(
- 'handler' => 'views_handler_filter_numeric',
- ),
- 'sort' => array(
- 'handler' => 'views_handler_sort',
- ),
- );
-
-
- $data['chado_feature']['table']['join']['feature'] = array(
- 'left_field' => 'feature_id',
- 'field' => 'feature_id',
- );
-
- $data['node']['table']['join']['chado_feature'] = array(
- 'left_field' => 'nid',
- 'field' => 'nid',
- );
-
- $data['node']['table']['join']['feature'] = array(
- 'left_table' => 'chado_feature',
- 'left_field' => 'nid',
- 'field' => 'nid',
- );
-
- $data['chado_feature']['feature_nid'] = array(
- 'group' => 'Feature',
- 'title' => 'Feature Node',
- 'help' => 'Links Chado Feature Fields/Data to the Nodes in the current View.',
- 'real field' => 'feature_id',
- 'relationship' => array(
- 'handler' => 'views_handler_relationship',
- 'title' => t('Chado => Feature'),
- 'label' => t('Chado => Feature'),
- 'real field' => 'feature_id',
- 'base' => 'feature',
- 'base field' => 'feature_id'
- ),
- );
-
- $data['chado_feature']['feature_chado_nid'] = array(
- 'group' => 'Feature',
- 'title' => 'Feature Node',
- 'help' => 'Links Chado Feature Fields/Data to the Nodes in the current View.',
- 'real field' => 'nid',
- 'relationship' => array(
- 'handler' => 'views_handler_relationship',
- 'title' => t('Chado => Node'),
- 'label' => t('Chado => Node'),
- 'real field' => 'nid',
- 'base' => 'node',
- 'base field' => 'nid'
- ),
- );
- }
-
- if (module_exists('tripal_analysis')) {
-
- $data['chado_analysis']['table'] = array(
- 'field' => 'nid',
- 'group' => 'Chado Analysis'
- );
- $data['chado_analysis']['nid'] = array(
- 'title' => t('Analysis Node ID'),
- 'help' => t('The node ID for this analysis'),
- 'field' => array(
- 'handler' => 'views_handler_field_numeric',
- 'click sortable' => TRUE,
- ),
- 'filter' => array(
- 'handler' => 'views_handler_filter_numeric',
- ),
- 'sort' => array(
- 'handler' => 'views_handler_sort',
- ),
- );
-
-
- $data['chado_analysis']['table']['join']['analysis'] = array(
- 'left_field' => 'analysis_id',
- 'field' => 'analysis_id',
- );
-
- $data['node']['table']['join']['chado_analysis'] = array(
- 'left_field' => 'nid',
- 'field' => 'nid',
- );
-
- $data['node']['table']['join']['analysis'] = array(
- 'left_table' => 'chado_analysis',
- 'left_field' => 'nid',
- 'field' => 'nid',
- );
-
- $data['chado_analysis']['analysis_nid'] = array(
- 'group' => 'Analysis',
- 'title' => 'Analysis Node',
- 'help' => 'Links Chado Analysis Fields/Data to the Nodes in the current View.',
- 'real field' => 'analysis_id',
- 'relationship' => array(
- 'handler' => 'views_handler_relationship',
- 'title' => t('Chado => Analysis'),
- 'label' => t('Chado => Analysis'),
- 'real field' => 'analysis_id',
- 'base' => 'analysis',
- 'base field' => 'analysis_id'
- ),
- );
-
- $data['chado_analysis']['analysis_chado_nid'] = array(
- 'group' => 'Analysis',
- 'title' => 'Analysis Node',
- 'help' => 'Links Chado Analysis Fields/Data to the Nodes in the current View.',
- 'real field' => 'nid',
- 'relationship' => array(
- 'handler' => 'views_handler_relationship',
- 'title' => t('Chado => Node'),
- 'label' => t('Chado => Node'),
- 'real field' => 'nid',
- 'base' => 'node',
- 'base field' => 'nid'
- ),
- );
- }
-
- if (module_exists('tripal_organism')) {
-
- $data['chado_organism']['table'] = array(
- 'field' => 'nid',
- 'group' => 'Chado Organism'
- );
- $data['chado_organism']['nid'] = array(
- 'title' => t('Organism Node ID'),
- 'help' => t('The node ID for this organism'),
- 'field' => array(
- 'handler' => 'views_handler_field_numeric',
- 'click sortable' => TRUE,
- ),
- 'filter' => array(
- 'handler' => 'views_handler_filter_numeric',
- ),
- 'sort' => array(
- 'handler' => 'views_handler_sort',
- ),
- );
-
-
- $data['chado_organism']['table']['join']['organism'] = array(
- 'left_field' => 'organism_id',
- 'field' => 'organism_id',
- );
-
- $data['node']['table']['join']['chado_organism'] = array(
- 'left_field' => 'nid',
- 'field' => 'nid',
- );
-
- $data['node']['table']['join']['organism'] = array(
- 'left_table' => 'chado_organism',
- 'left_field' => 'nid',
- 'field' => 'nid',
- );
-
- $data['chado_organism']['organism_id'] = array(
- 'group' => 'Organism',
- 'title' => 'Organism Node',
- 'help' => 'Links Chado Organism Fields/Data to the Nodes in the current View.',
- 'real field' => 'organism_id',
- 'relationship' => array(
- 'handler' => 'views_handler_relationship',
- 'title' => t('Chado => Organism'),
- 'label' => t('Chado => Organism'),
- 'real field' => 'organism_id',
- 'base' => 'organism',
- 'base field' => 'organism_id'
- ),
- );
-
- }
-
- if (module_exists('tripal_library')) {
-
- $data['chado_library']['table'] = array(
- 'field' => 'nid',
- 'group' => 'Chado Library'
- );
- $data['chado_library']['nid'] = array(
- 'title' => t('Library Node ID'),
- 'help' => t('The node ID for this library'),
- 'field' => array(
- 'handler' => 'views_handler_field_numeric',
- 'click sortable' => TRUE,
- ),
- 'filter' => array(
- 'handler' => 'views_handler_filter_numeric',
- ),
- 'sort' => array(
- 'handler' => 'views_handler_sort',
- ),
- );
-
-
- $data['chado_library']['table']['join']['library'] = array(
- 'left_field' => 'library_id',
- 'field' => 'library_id',
- );
-
- $data['node']['table']['join']['chado_library'] = array(
- 'left_field' => 'nid',
- 'field' => 'nid',
- );
-
- $data['node']['table']['join']['library'] = array(
- 'left_table' => 'chado_library',
- 'left_field' => 'nid',
- 'field' => 'nid',
- );
-
- $data['chado_library']['library_nid'] = array(
- 'group' => 'Library',
- 'title' => 'Library Node',
- 'help' => 'Links Chado Library Fields/Data to the Nodes in the current View.',
- 'real field' => 'library_id',
- 'relationship' => array(
- 'handler' => 'views_handler_relationship',
- 'title' => t('Chado => Library'),
- 'label' => t('Chado => Library'),
- 'real field' => 'library_id',
- 'base' => 'library',
- 'base field' => 'library_id'
- ),
- );
-
- $data['chado_library']['library_chado_nid'] = array(
- 'group' => 'Library',
- 'title' => 'Library Node',
- 'help' => 'Links Chado Library Fields/Data to the Nodes in the current View.',
- 'real field' => 'nid',
- 'relationship' => array(
- 'handler' => 'views_handler_relationship',
- 'title' => t('Chado => Node'),
- 'label' => t('Chado => Node'),
- 'real field' => 'nid',
- 'base' => 'node',
- 'base field' => 'nid'
- ),
- );
- }
-
- if (module_exists('tripal_stock')) {
-
- $data['chado_stock']['table'] = array(
- 'field' => 'stock_id',
- 'group' => 'Chado Stock',
- );
- $data['chado_stock']['nid'] = array(
- 'title' => t('Stock Node ID'),
- 'help' => t('The node ID for this analysis'),
- 'field' => array(
- 'handler' => 'views_handler_field_numeric',
- 'click sortable' => TRUE,
- ),
- 'filter' => array(
- 'handler' => 'views_handler_filter_numeric',
- ),
- 'sort' => array(
- 'handler' => 'views_handler_sort',
- ),
- );
-
-
- $data['chado_stock']['table']['join']['stock'] = array(
- 'left_field' => 'stock_id',
- 'field' => 'stock_id',
- );
-
- $data['node']['table']['join']['chado_stock'] = array(
- 'left_field' => 'nid',
- 'field' => 'nid',
- );
-
- $data['node']['table']['join']['stock'] = array(
- 'left_table' => 'chado_stock',
- 'left_field' => 'nid',
- 'field' => 'nid',
- );
-
- $data['chado_stock']['stock_nid'] = array(
- 'group' => 'Stock',
- 'title' => 'Stock Node',
- 'help' => 'Links Chado Stock Fields/Data to the Nodes in the current View.',
- 'real field' => 'stock_id',
- 'relationship' => array(
- 'handler' => 'views_handler_relationship',
- 'title' => t('Chado => Stock'),
- 'label' => t('Chado => Stock'),
- 'real field' => 'stock_id',
- 'base' => 'stock',
- 'base field' => 'stock_id'
- ),
- );
-
- $data['chado_stock']['stock_chado_nid'] = array(
- 'group' => 'Stock',
- 'title' => 'Stock Node',
- 'help' => 'Links Chado Stock Fields/Data to the Nodes in the current View.',
- 'real field' => 'nid',
- 'relationship' => array(
- 'handler' => 'views_handler_relationship',
- 'title' => t('Chado => Node'),
- 'label' => t('Chado => Node'),
- 'real field' => 'nid',
- 'base' => 'node',
- 'base field' => 'nid'
- ),
- );
- }
- return $data;
- }
|