123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <?php
- /**
- * @file
- * This file contains all the functions which describe and implement drupal database tables
- * needed by this module.
- *
- * The eimage manamgenet module allows you to sync data in a chado/Tripal instance with
- * multiple eimages as well as manage and create such eimages
- */
- /**
- * Implementation of hook_install().
- */
- function tripal_eimage_install() {
- drupal_install_schema('tripal_eimage');
- }
- /**
- * Implementation of hook_uninstall().
- */
- function tripal_eimage_uninstall() {
- drupal_uninstall_schema('tripal_eimage');
- }
- /**
- * Implementation of hook_schema().
- */
- function tripal_eimage_schema() {
- $schema['chado_eimage'] = array(
- 'fields' => array(
- 'nid' => array(
- 'type' => 'int',
- 'unsigned' => TRUE,
- 'not null' => TRUE,
- ),
- 'vid' => array(
- 'type' => 'int',
- 'not null' => TRUE,
- ),
- 'eimage_id' => array(
- 'type' => 'int',
- 'unsigned' => TRUE,
- 'not null' => TRUE,
- ),
- ),
- 'primary key' => array('nid', 'vid', 'eimage_id'),
- );
- return $schema;
- }
- /**
- * Implementation of hook_requirements().
- *
- */
- function tripal_eimage_requirements($phase) {
- $requirements = array();
- if ($phase == 'install') {
- // make sure chado is installed
- if (!tripal_core_is_chado_installed()) {
- $requirements ['tripal_eimage'] = array(
- 'title' => "tripal_eimage",
- 'value' => "ERROR: Chado most be installed before this module can be enabled",
- 'severity' => REQUIREMENT_ERROR,
- );
- }
- }
- return $requirements;
- }
|