tripal_natural_diversity.module 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. require_once('api/tripal_natural_diversity.api.inc');
  3. require_once('includes/tripal_natural_diversity.schema.inc');
  4. /**
  5. * @file
  6. * This file contains the basic functions needed for this drupal module.
  7. * The drupal tripal_natural_diversity module maps directly to the chado X module.
  8. *
  9. * For documentation regarding the Chado X module:
  10. * @see http://gmod.org/wiki/Chado_General_Module
  11. */
  12. /*************************************************************************
  13. * Implements hook_views_api()
  14. * Purpose: Essentially this hook tells drupal that there is views support for
  15. * for this module which then includes tripal_natural_diversity.views.inc where all the
  16. * views integration code is
  17. */
  18. function tripal_natural_diversity_views_api() {
  19. return array(
  20. 'api' => 2.0,
  21. );
  22. }
  23. /**
  24. * Implements hook_theme
  25. */
  26. function tripal_natural_diversity_theme() {
  27. return array(
  28. 'tripal_feature_genotype_experiments' => array(
  29. 'arguments' => array('node' => NULL),
  30. 'template' => 'tripal_feature-genotype_experiments',
  31. ),
  32. 'tripal_stock_nd_genotypes' => array(
  33. 'arguments' => array('node' => NULL),
  34. 'template' => 'tripal_stock_nd_genotypes',
  35. ),
  36. );
  37. }
  38. /*
  39. *
  40. */
  41. function tripal_natural_diversity_nodeapi(&$node, $op, $teaser, $page){
  42. switch ($op) {
  43. case 'view':
  44. if ($node->type == 'chado_feature') {
  45. $node->content['tripal_feature_genotype_experiments'] = array(
  46. '#value' => theme('tripal_feature_genotype_experiments', $node),
  47. );
  48. }
  49. }
  50. }
  51. /*
  52. *
  53. */
  54. function tripal_natural_diversity_preprocess_tripal_stock_nd_genotypes(&$variables){
  55. }