tripal_natural_diversity.views.inc 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. /**
  3. * @file
  4. * This file contains the basic functions for views integration of
  5. * chado/tripal_natural_diversity tables. Supplementary functions can be found in
  6. * ./views/
  7. *
  8. * Documentation on views integration can be found at
  9. * http://views2.logrus.com/doc/html/index.html.
  10. */
  11. /*************************************************************************
  12. * Implements hook_views_data()
  13. * Purpose: Describe chado/tripal tables & fields to views
  14. *
  15. * @return: a data array which follows the structure outlined in the
  16. * views2 documentation for this hook. Essentially, it's an array of table
  17. * definitions keyed by chado/tripal table name. Each table definition
  18. * includes basic details about the table, fields in that table and
  19. * relationships between that table and others (joins)
  20. */
  21. require_once('views/nd_experiment.views.inc');
  22. require_once('views/nd_experimentprop.views.inc');
  23. require_once('views/nd_geolocation.views.inc');
  24. function tripal_natural_diversity_views_data() {
  25. $data = array();
  26. $data = array_merge($data, retrieve_nd_experiment_views_data());
  27. $data = array_merge($data, retrieve_nd_experimentprop_views_data());
  28. $data = array_merge($data, retrieve_nd_geolocation_views_data());
  29. return $data;
  30. }
  31. /*************************************************************************
  32. * Implements hook_views_handlers()
  33. * Purpose: Register all custom handlers with views
  34. * where a handler describes either "the type of field",
  35. * "how a field should be filtered", "how a field should be sorted"
  36. *
  37. * @return: An array of handler definitions
  38. */
  39. function tripal_natural_diversity_views_handlers() {
  40. return array(
  41. 'info' => array(
  42. 'path' => drupal_get_path('module', 'tripal_natural_diversity') . '/views/handlers',
  43. ),
  44. 'handlers' => array(
  45. ),
  46. );
  47. }