tripal_db.install

  1. 2.x tripal_db/tripal_db.install
  2. 3.x legacy/tripal_db/tripal_db.install
  3. 1.x tripal_db/tripal_db.install

Contains functions related to the installation of this module

File

tripal_db/tripal_db.install
View source
  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. }