tripal_db.install 871 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * @file
  4. * Contains functions related to the installation of this module
  5. */
  6. /**
  7. * Implementation of hook_install().
  8. *
  9. * @ingroup tripal_db
  10. */
  11. function tripal_db_install() {
  12. // create the module's data directory
  13. tripal_create_moddir('tripal_db');
  14. }
  15. /**
  16. * Implementation of hook_uninstall().
  17. *
  18. * @ingroup tripal_db
  19. */
  20. function tripal_db_uninstall() {
  21. }
  22. /**
  23. * Implementation of hook_requirements().
  24. */
  25. function tripal_db_requirements($phase) {
  26. $requirements = array();
  27. if ($phase == 'install') {
  28. // make sure chado is installed
  29. if (!tripal_core_is_chado_installed()) {
  30. $requirements ['tripal_db'] = array(
  31. 'title' => "tripal_db",
  32. 'value' => "ERROR: Chado most be installed before this module can be enabled",
  33. 'severity' => REQUIREMENT_ERROR,
  34. );
  35. }
  36. }
  37. return $requirements;
  38. }