tripal_contact.api.inc 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /**
  3. * @file
  4. * @todo Add file header description
  5. */
  6. /**
  7. * @section Chado Table Descriptions
  8. */
  9. /**
  10. * Implements hook_chado_contact_schema()
  11. * Purpose: To add descriptions and foreign keys to default table description
  12. * Note: This array will be merged with the array from all other implementations
  13. *
  14. * @return
  15. * Array describing the contact table
  16. */
  17. function tripal_stock_chado_contact_schema() {
  18. $description = array();
  19. $description['foreign keys']['cvterm'] = array(
  20. 'table' => 'cvterm',
  21. 'columns' => array(
  22. 'type_id' => 'cvterm_id',
  23. ),
  24. );
  25. return $description;
  26. }
  27. /**
  28. * Implements hook_chado_contact_relationship_schema()
  29. * Purpose: To add descriptions and foreign keys to default table description
  30. * Note: This array will be merged with the array from all other implementations
  31. *
  32. * @return
  33. * Array describing the contact_relationship table
  34. */
  35. function tripal_stock_chado_contact_relationship_schema() {
  36. $description = array();
  37. $description['foreign keys']['cvterm'] = array(
  38. 'table' => 'cvterm',
  39. 'columns' => array(
  40. 'type_id' => 'cvterm_id',
  41. ),
  42. );
  43. $description['foreign keys']['contact'] = array(
  44. 'table' => 'contact',
  45. 'columns' => array(
  46. 'subject_id' => 'contact_id',
  47. 'object_id' => 'contact_id',
  48. ),
  49. );
  50. return $description;
  51. }