forked from Islandora/islandora_solution_pack_audio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathislandora_audio_sp.module
53 lines (49 loc) · 1.67 KB
/
islandora_audio_sp.module
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
/**
* Islandora audio solution pack module
*/
/**
* Islandora audio solution pack required fedora objects
* @return type
*/
function islandora_audio_sp_required_fedora_objects() {
module_load_include('inc', 'fedora_repository', 'fedora_repository.solutionpacks');
$module_path = drupal_get_path('module', 'islandora_audio_sp');
$islandora_path = drupal_get_path('module', 'fedoroa_repository');
$form_name = 'Islandora Audio MODS Form';
$form_xml = file_get_contents("$module_path/xml/mods_audio.xml");
solution_pack_add_form($form_name, $form_xml);
solution_pack_add_form_association('islandora:sp-audioCModel', $form_name);
return array(
'islandora_audio_sp' => array(
'module' => 'islandora_audio_sp',
'title' => 'Islandora Audio Solution Pack',
'objects' => array(
array(
'foxml_file' => "$module_path/xml/islandora_sp_audioCModel.xml",
'pid' => 'islandora:sp-audioCModel',
'dsid' => NULL,
'datastream_file' => NULL,
'dsversion' => NULL,
),
array(
'pid' => 'islandora:audio_collection',
'label' => 'Audio Collection',
'cmodel' => 'islandora:collectionCModel',
'parent' => 'islandora:root',
'datastreams' => array(
array(
'dsid' => 'COLLECTION_POLICY',
'datastream_file' => "$module_path/xml/audio_collection_policy.xml",
),
array(
'dsid' => 'TN',
'datastream_file' => "$module_path/images/Crystal_Clear_filesystem_folder_grey.png",
'mimetype' => 'image/png',
),
),
),
),
),
);
}