tripal_db.install 949 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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(). Make sure 'Tripal Core' is enabled
  24. * before installation
  25. *
  26. * @ingroup tripal_db
  27. */
  28. function tripal_db_requirements($phase) {
  29. $requirements = array();
  30. if ($phase == 'install') {
  31. if (!function_exists('tripal_create_moddir')) {
  32. $requirements ['tripal_db'] = array(
  33. 'title' => "tripal_db",
  34. 'value' => "Required modules must be installed first before Tripal DB module can be installed. Please try again.",
  35. 'severity' => REQUIREMENT_ERROR,
  36. );
  37. }
  38. }
  39. return $requirements;
  40. }