tripal_organism.DEPRECATED.inc

  1. 2.x tripal_organism/api/tripal_organism.DEPRECATED.inc
  2. 3.x legacy/tripal_organism/api/tripal_organism.DEPRECATED.inc

Wrapper functions to provide backwards compatibility for the tripal organism api

File

legacy/tripal_organism/api/tripal_organism.DEPRECATED.inc
View source
  1. <?php
  2. /**
  3. * @file
  4. * Wrapper functions to provide backwards compatibility for the tripal organism api
  5. */
  6. /**
  7. * @deprecated Restructured API to make naming more readable and consistent.
  8. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  9. * This function has been replaced by tripal_get_organism().
  10. *
  11. * @see tripal_get_organism().
  12. */
  13. function tripal_organism_get_organism_by_nid($nid) {
  14. tripal_report_error(
  15. 'tripal_deprecated',
  16. TRIPAL_NOTICE,
  17. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  18. array(
  19. '%old_function'=>'tripal_organism_get_organism_by_nid',
  20. '%new_function' => 'tripal_get_organism'
  21. )
  22. );
  23. return tripal_get_organism(array('nid' => $nid));
  24. }
  25. /**
  26. * @deprecated Restructured API to make naming more readable and consistent.
  27. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  28. * This function has been replaced by tripal_get_organism().
  29. *
  30. * @see tripal_get_organism().
  31. */
  32. function tripal_organism_get_organism_by_organism_id($organism_id) {
  33. tripal_report_error(
  34. 'tripal_deprecated',
  35. TRIPAL_NOTICE,
  36. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  37. array(
  38. '%old_function'=>'tripal_organism_get_organism_by_organism_id',
  39. '%new_function' => 'tripal_get_organism'
  40. )
  41. );
  42. return tripal_get_organism(array('organism_id' => $organism_id));
  43. }
  44. /**
  45. * @deprecated Restructured API to make naming more readable and consistent.
  46. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  47. * This function has been replaced by tripal_get_organism_select_options().
  48. *
  49. * @see tripal_get_organism_select_options().
  50. */
  51. function tripal_organism_get_synced() {
  52. tripal_report_error(
  53. 'tripal_deprecated',
  54. TRIPAL_NOTICE,
  55. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  56. array(
  57. '%old_function'=>'tripal_organism_get_synced',
  58. '%new_function' => 'tripal_get_organism_select_options'
  59. )
  60. );
  61. return tripal_get_organism_select_options();
  62. }
  63. /**
  64. * @deprecated Restructured API to make naming more readable and consistent.
  65. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  66. * This function has been replaced by tripal_get_organism_image().
  67. *
  68. * @see tripal_get_organism_image().
  69. */
  70. function tripal_organism_get_image_url($organism, $nid = NULL) {
  71. tripal_report_error(
  72. 'tripal_deprecated',
  73. TRIPAL_NOTICE,
  74. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  75. array(
  76. '%old_function'=>'tripal_organism_get_image_url',
  77. '%new_function' => 'tripal_get_organism_image'
  78. )
  79. );
  80. return tripal_get_organism_image_url($organism);
  81. }