tripal_genetic.module 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. * @file
  4. * This file contains the basic functions needed for this drupal module.
  5. * The drupal tripal_genetic module maps directly to the chado X module.
  6. *
  7. * For documentation regarding the Chado X module:
  8. * @see http://gmod.org/wiki/Chado_General_Module
  9. */
  10. require('api/tripal_genetic.api.inc');
  11. require('includes/tripal_genetic.schema.inc');
  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_genetic.views.inc where all the
  16. * views integration code is
  17. */
  18. function tripal_genetic_views_api() {
  19. return array(
  20. 'api' => 2.0,
  21. );
  22. }
  23. /*
  24. *
  25. */
  26. function tripal_genetic_theme() {
  27. return array(
  28. 'tripal_feature_genotypes' => array(
  29. 'arguments' => array('node' => NULL),
  30. 'template' => 'tripal_feature_genotypes',
  31. ),
  32. );
  33. }
  34. /**
  35. *
  36. */
  37. function tripal_genetic_nodeapi(&$node, $op, $teaser, $page) {
  38. switch ($op) {
  39. case 'view':
  40. if ($node->type == 'chado_feature') {
  41. $node->content['tripal_feature_genotypes'] = array(
  42. '#value' => theme('tripal_feature_genotypes', $node),
  43. );
  44. }
  45. }
  46. }