tripal_db.install 884 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * Implementation of hook_install();
  4. *
  5. * @ingroup tripal_db
  6. */
  7. function tripal_db_install(){
  8. // create the module's data directory
  9. tripal_create_moddir('tripal_db');
  10. }
  11. /**
  12. * Implementation of hook_uninstall()
  13. *
  14. * @ingroup tripal_db
  15. */
  16. function tripal_db_uninstall(){
  17. }
  18. /**
  19. * Implementation of hook_requirements(). Make sure 'Tripal Core' is enabled
  20. * before installation
  21. *
  22. * @ingroup tripal_db
  23. */
  24. function tripal_db_requirements($phase) {
  25. $requirements = array();
  26. if ($phase == 'install') {
  27. if (!function_exists('tripal_create_moddir')) {
  28. $requirements ['tripal_db'] = array(
  29. 'title' => "tripal_db",
  30. 'value' => "Required modules must be installed first before Tripal DB module can be installed. Please try again.",
  31. 'severity' => REQUIREMENT_ERROR,
  32. );
  33. }
  34. }
  35. return $requirements;
  36. }