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
1.0 KiB
42 lines
1.0 KiB
<?php |
|
|
|
/** |
|
* @file |
|
* Install hooks for this module. |
|
*/ |
|
|
|
/** |
|
* Implements hook_install(). |
|
* |
|
* Creates shared fields for content types using DC metadata. |
|
*/ |
|
function islandora_dc_install() { |
|
module_load_include('inc', 'islandora', 'include/fields'); |
|
|
|
$field_names = array( |
|
ISLANDORA_DC_CONTRIBUTOR_FIELD, |
|
ISLANDORA_DC_COVERAGE_FIELD, |
|
ISLANDORA_DC_CREATOR_FIELD, |
|
ISLANDORA_DC_DATE_FIELD, |
|
ISLANDORA_DC_DESCRIPTION_FIELD, |
|
ISLANDORA_DC_FORMAT_FIELD, |
|
ISLANDORA_DC_IDENTIFIER_FIELD, |
|
ISLANDORA_DC_LANGUAGE_FIELD, |
|
ISLANDORA_DC_PUBLISHER_FIELD, |
|
ISLANDORA_DC_RELATION_FIELD, |
|
ISLANDORA_DC_RIGHTS_FIELD, |
|
ISLANDORA_DC_SOURCE_FIELD, |
|
ISLANDORA_DC_SUBJECT_FIELD, |
|
ISLANDORA_DC_TITLE_FIELD, |
|
ISLANDORA_DC_TYPE_FIELD, |
|
); |
|
|
|
foreach ($field_names as $field_name) { |
|
islandora_create_field(array( |
|
'field_name' => $field_name, |
|
'type' => 'text_long', |
|
'cardinality' => FIELD_CARDINALITY_UNLIMITED, |
|
)); |
|
} |
|
|
|
}
|
|
|