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

Go to the source code of this file.

Functions

 tripal_contact_views_data ()
 tripal_contact_views_handlers ()
 tripal_contact_views_default_views ()

Detailed Description

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


Function Documentation

tripal_contact_views_data ( )

Definition at line 25 of file tripal_contact.views.inc.

                                      {
  $data = array();

  if (module_exists('tripal_views')) {

    // Base Table: contact
    $tablename = 'contact';
    $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);
      $status = tripal_views_integration_add_entry($table_integration_array);
        if (!$status) {
          drupal_set_message(t('Tripal Contact is unable to integrate %table', array('%table' => $tablename)), 'error');
        }
    }

    // Additional tables
    $tables = array(
      'contact_relationship',
    );
    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);
        $status = tripal_views_integration_add_entry($table_integration_array);
        if (!$status) {
          drupal_set_message(t('Tripal Contact is unable to integrate %table', array('%table' => $tablename)), 'error');
        }
      }
    }
  }

  return $data;
}
tripal_contact_views_handlers ( )

Definition at line 73 of file tripal_contact.views.inc.

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

  ),
  );
}
 All Classes Files Functions Variables