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. * Implements hook_disable().
  8. * Disable default views when module is disabled
  9. *
  10. * @ingroup tripal_db
  11. */
  12. function tripal_db_disable() {
  13. // Disable all default views provided by this module
  14. require_once("tripal_db.views_default.inc");
  15. $views = tripal_db_views_default_views();
  16. foreach (array_keys($views) as $view_name) {
  17. tripal_disable_view($view_name,FALSE,array('suppress_error' => TRUE));
  18. }
  19. }
  20. /**
  21. * Implementation of hook_requirements().
  22. *
  23. * @ingroup tripal_db
  24. */
  25. function tripal_db_requirements($phase) {
  26. $requirements = array();
  27. if ($phase == 'install') {
  28. // make sure chado is installed
  29. if (!$GLOBALS["chado_is_installed"]) {
  30. $requirements ['tripal_db'] = array(
  31. 'title' => "tripal_db",
  32. 'value' => "ERROR: Chado must be installed before this module can be enabled",
  33. 'severity' => REQUIREMENT_ERROR,
  34. );
  35. }
  36. }
  37. return $requirements;
  38. }
  39. /**
  40. * Implementation of hook_install().
  41. *
  42. * @ingroup tripal_db
  43. */
  44. function tripal_db_install() {
  45. }
  46. /**
  47. * Implementation of hook_uninstall().
  48. *
  49. * @ingroup tripal_db
  50. */
  51. function tripal_db_uninstall() {
  52. }
  53. /**
  54. * Implementation of hook_update_dependencies().
  55. *
  56. * It specifies a list of other modules whose updates must be run prior to
  57. * this one. It also ensures the the Tripal API is in scope for site
  58. * upgrades when tripal_core is disabled.
  59. */
  60. function tripal_db_update_dependencies() {
  61. $dependencies = array();
  62. return $dependencies;
  63. }