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.
41 lines
934 B
41 lines
934 B
10 years ago
|
<?php
|
||
|
|
||
|
/**
|
||
|
* @file
|
||
|
* Install hooks for this module.
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
* Implements hook_install().
|
||
|
*
|
||
|
* Creates shared fields for content types using DC metadata.
|
||
|
*/
|
||
|
function islandora_dc_install() {
|
||
|
$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) {
|
||
|
$field = array(
|
||
|
'field_name' => $field_name,
|
||
|
'type' => 'text_long',
|
||
|
'cardinality' => FIELD_CARDINALITY_UNLIMITED,
|
||
|
);
|
||
|
field_create_field($field);
|
||
|
}
|
||
|
}
|