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

Go to the source code of this file.

Functions

 tripal_project_views_data ()
 tripal_project_views_handlers ()
 tripal_project_views_default_views ()

Detailed Description

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


Function Documentation

tripal_project_views_data ( )

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

                                      {
  $data = array();

  if (module_exists('tripal_views')) {
    $tables = array(
      'project'
    );
    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 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(
    );
    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_project_views_handlers ( )

Definition at line 78 of file tripal_project.views.inc.

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

  ),
  );
}
 All Classes Files Functions Variables