<?php

/**
 * @file
 * Contains functions executed only on install/uninstall of this module
 */

/**
 * Implements hook_disable().
 * Disable default views when module is disabled
 *
 * @ingroup tripal_cv
 */
function tripal_cv_disable() {

  // Disable all default views provided by this module
  require_once("tripal_cv.views_default.inc");
  $views = tripal_cv_views_default_views();
  foreach (array_keys($views) as $view_name) {
    tripal_disable_view($view_name,FALSE,array('suppress_error' => TRUE));
  }

}

/**
 * Implementation of hook_requirements().
 *
 * @ingroup tripal_cv
 */
function tripal_cv_requirements($phase) {
  $requirements = array();
  if ($phase == 'install') {
    // make sure chado is installed
    if (!$GLOBALS["chado_is_installed"]) {
      $requirements ['tripal_cv'] = array(
        'title' => "tripal_cv",
        'value' => "ERROR: Chado must be installed before this module can be enabled",
        'severity' => REQUIREMENT_ERROR,
      );
    }
  }
  return $requirements;
}

/**
 * Implementation of hook_install().
 *
 * @ingroup tripal_cv
 */
function tripal_cv_install() {

}

/**
 * Implementation of hook_uninstall().
 *
 * @ingroup tripal_cv
 */
function tripal_cv_uninstall() {

}