Tripal v1.0 (6.x-1.0)
|
Go to the source code of this file.
Functions | |
tripal_featuremap_views_data () | |
tripal_featuremap_views_handlers () | |
tripal_featuremap_views_data_alter (&$data) | |
tripal_featuremap_views_default_views () |
This file contains the basic functions for views integration of chado/tripal organism tables. Supplementary functions can be found in ./views/
Documentation on views integration can be found at http://views2.logrus.com/doc/html/index.html.
Definition in file tripal_featuremap.views.inc.
tripal_featuremap_views_data | ( | ) |
Definition at line 29 of file tripal_featuremap.views.inc.
{ $data = array(); if (module_exists('tripal_views')) { $tables = array( 'featuremap' ); foreach ($tables as $tablename) { $priority = 9; // check to see if the table is integrated. If it is then integrate it's // corresponding 'chado_[table]' table. if (!tripal_views_is_integrated($tablename, $priority)) { $table_integration_array = tripal_views_get_integration_array_for_chado_table($tablename, TRUE, $priority); // Add custom handle to handle type_ids $table_integration_array['fields']['unittype_id']['handlers']['filter']['name'] = 'tripal_views_handler_filter_select_cvterm'; // Add in node relationships if chado is in the same db as drupal if (tripal_core_chado_schema_exists()) { $integrations = tripal_views_add_node_relationship_to_chado_table_integration($table_integration_array); foreach ($integrations as $integration) { tripal_views_integration_add_entry($integration); } } else { tripal_views_integration_add_entry($table_integration_array); } } } $tables = array( 'map_cvterm', 'map_feature', 'map_pub', 'map_synonym', 'mapprop' ); foreach ($tables as $tablename) { $priority = 9; if (!tripal_views_is_integrated($tablename, $priority)) { $table_integration_array = tripal_views_get_integration_array_for_chado_table($tablename, FALSE, $priority); tripal_views_integration_add_entry($table_integration_array); } } } return $data; }
tripal_featuremap_views_data_alter | ( | &$ | data | ) |
Implementation of hook_views_data_alter().
Definition at line 105 of file tripal_featuremap.views.inc.
{ if ( !(is_array($db_url) and array_key_exists('chado', $db_url)) ) { // Add featuer relationship to node $data['node']['map_chado_nid'] = array( 'group' => 'Map', 'title' => 'Map Node', 'help' => 'Links Chado Map Fields/Data to the Nodes in the current View.', 'real field' => 'nid', 'relationship' => array( 'handler' => 'views_handler_relationship', 'title' => t('Node => Chado'), 'label' => t('Node => Chado'), 'real field' => 'nid', 'base' => 'chado_map', 'base field' => 'nid' ), ); } }
tripal_featuremap_views_handlers | ( | ) |
Definition at line 89 of file tripal_featuremap.views.inc.
{ return array( 'info' => array( 'path' => drupal_get_path('module', 'tripal_featuremap') . '/views/handlers', ), 'handlers' => array( 'views_handler_field_computed_map_nid' => array( 'parent' => 'views_handler_field_numeric', ), ), ); }