TRUE)); } } /** * Implementation of hook_requirements(). * * @ingroup tripal_legacy_natural_diversity */ function tripal_natural_diversity_requirements($phase) { $requirements = array(); if ($phase == 'install') { // make sure chado is installed if (!$GLOBALS["chado_is_installed"]) { $requirements ['tripal_natural_diversity'] = array( 'title' => "tripal_natural_diversity", 'value' => "ERROR: Chado must be installed before this module can be enabled", 'severity' => REQUIREMENT_ERROR, ); } } return $requirements; } /** * Implementation of hook_install(). * * @ingroup tripal_legacy_natural_diversity */ function tripal_natural_diversity_install() { // add cvterms tripal_natural_diversity_add_cvterms(); } /** * Implementation of hook_uninstall(). * * @ingroup tripal_legacy_natural_diversity */ function tripal_natural_diversity_uninstall() { } /** * Add cvterms related to natural diversity * * @ingroup tripal_legacy_natural_diversity */ function tripal_natural_diversity_add_cvterms(){ // add cvterms for the nd_experiment_types tripal_insert_cvterm( array( 'name' => 'Genotyping', 'definition' => 'An experiment where genotypes of individuals are identified.', 'cv_name' => 'nd_experiment_types', 'is_relationship' => 0, 'db_name' => 'tripal' ), array('update_existing' => TRUE) ); tripal_insert_cvterm( array( 'name' => 'Phenotyping', 'definition' => 'An experiment where phenotypes of individuals are identified.', 'cv_name' => 'nd_experiment_types', 'is_relationship' => 0, 'db_name' => 'tripal' ), array('update_existing' => TRUE) ); tripal_insert_cvterm( array( 'name' => 'Location', 'definition' => 'The name of the location.', 'cv_name' => 'nd_geolocation_property', 'is_relationship' => 0, 'db_name' => 'tripal' ), array('update_existing' => TRUE) ); }