Drupal modules for browsing and managing Fedora-based digital repositories.
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.
 
 
 
 

40 lines
1.0 KiB

<?php
/**
* @file
* Install hook for dcterms metadata.
*/
/**
* Implements hook_install().
*
* Creates shared fields for all content types using dcterms metadata.
*/
function islandora_dcterms_install() {
$dcterms_field_names = array(
ISLANDORA_DCTERMS_CONTRIBUTOR_FIELD,
ISLANDORA_DCTERMS_COVERAGE_FIELD,
ISLANDORA_DCTERMS_CREATOR_FIELD,
ISLANDORA_DCTERMS_DATE_FIELD,
ISLANDORA_DCTERMS_DESCRIPTION_FIELD,
ISLANDORA_DCTERMS_FORMAT_FIELD,
ISLANDORA_DCTERMS_IDENTIFIER_FIELD,
ISLANDORA_DCTERMS_LANGUAGE_FIELD,
ISLANDORA_DCTERMS_PUBLISHER_FIELD,
ISLANDORA_DCTERMS_RELATION_FIELD,
ISLANDORA_DCTERMS_RIGHTS_FIELD,
ISLANDORA_DCTERMS_SOURCE_FIELD,
ISLANDORA_DCTERMS_SUBJECT_FIELD,
ISLANDORA_DCTERMS_TITLE_FIELD,
ISLANDORA_DCTERMS_TYPE_FIELD,
);
foreach ($dcterms_field_names as $field_name) {
$field = array(
'field_name' => $field_name,
'type' => 'text_long',
'cardinality' => FIELD_CARDINALITY_UNLIMITED,
);
field_create_field($field);
}
}