Tripal v1.0 (6.x-1.0)
tripal_phenotype.views.inc File Reference

Go to the source code of this file.

Functions

 tripal_phenotype_views_data ()
 tripal_phenotype_views_handlers ()
 tripal_phenotype_views_default_views ()

Detailed Description

This file contains the basic functions for views integration of chado/tripal_phenotype 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_phenotype.views.inc.


Function Documentation

tripal_phenotype_views_data ( )

Definition at line 28 of file tripal_phenotype.views.inc.

                                        {
  $data = array();

  if (module_exists('tripal_views')) {
    $tables = array(
      'phenotype'
    );
    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 specialty handlers
        switch ($tablename) {
          case 'phenotype':
            $table_integration_array['fields']['attr_id']['handlers']['filter']['name'] = 'tripal_views_handler_filter_select_cvterm';
            $table_integration_array['fields']['assay_id']['handlers']['filter']['name'] = 'tripal_views_handler_filter_select_cvterm';
            $table_integration_array['fields']['cvalue_id']['handlers']['filter']['name'] = 'tripal_views_handler_filter_select_cvterm';
            $table_integration_array['fields']['observable_id']['handlers']['filter']['name'] = 'tripal_views_handler_filter_select_cvterm';
            break;
        }

        tripal_views_integration_add_entry($table_integration_array);
      }
    }

    $tables = array(
      'feature_phenotype',
      'phenotype_cvterm'
    );
    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_phenotype_views_handlers ( )

Definition at line 81 of file tripal_phenotype.views.inc.

                                           {
  return array(
   'info' => array(
     'path' => drupal_get_path('module', 'tripal_phenotype') . '/views/handlers',
  ),
   'handlers' => array(

  ),
  );
}
 All Classes Files Functions Variables