You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
840 B
42 lines
840 B
<?php |
|
|
|
/** |
|
* @file |
|
* This file contains all install related hooks. |
|
*/ |
|
|
|
/** |
|
* Implements hook_install(). |
|
* |
|
* Defines common fields for various bundles. |
|
*/ |
|
function islandora_install() { |
|
$tn_field = array( |
|
'field_name' => ISLANDORA_TN_FIELD, |
|
'type' => 'image', |
|
); |
|
field_create_field($tn_field); |
|
|
|
$dc_field = array( |
|
'field_name' => ISLANDORA_DC_FIELD, |
|
'type' => 'xml_field_xml', |
|
); |
|
field_create_field($dc_field); |
|
|
|
$mods_field = array( |
|
'field_name' => ISLANDORA_MODS_FIELD, |
|
'type' => 'xml_field_xml', |
|
); |
|
field_create_field($mods_field); |
|
} |
|
|
|
/** |
|
* Implements hook_uninstall(). |
|
* |
|
* Deletes the fields defined in hook_install(). |
|
*/ |
|
function islandora_uninstall() { |
|
field_delete_field(ISLANDORA_TN_FIELD); |
|
field_delete_field(ISLANDORA_DC_FIELD); |
|
field_delete_field(ISLANDORA_MODS_FIELD); |
|
}
|
|
|