This repository has been archived by the owner on May 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
islandora_mirador_bookreader.module
89 lines (83 loc) · 2.8 KB
/
islandora_mirador_bookreader.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?php
/**
* @file
* Defines all the hooks this module implements.
*/
/**
* Implements hook_menu().
*/
function islandora_mirador_bookreader_menu() {
return array(
'admin/islandora/islandora_viewers/mirador_bookreader' => array(
'title' => 'Mirador BookReader',
'description' => 'Configure the Mirador BookReader.',
'page callback' => 'drupal_get_form',
'page arguments' => array('islandora_mirador_bookreader_admin_settings_form'),
'access arguments' => array('administer site configuration'),
'file' => 'includes/admin.form.inc',
'type' => MENU_NORMAL_ITEM,
),
'admin/islandora/islandora_viewers/mirador_bookreader/config' => array(
'title' => 'Mirador BookReader Configuration',
'description' => 'Configure the Mirador BookReader.',
'page callback' => 'drupal_get_form',
'page arguments' => array('islandora_mirador_bookreader_admin_settings_form'),
'access arguments' => array('administer site configuration'),
'file' => 'includes/admin.form.inc',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => 0,
),
'admin/islandora/islandora_viewers/mirador_bookreader/json_generate' => array(
'title' => 'JSON for IIIF manifest',
'description' => 'JSON file for IIIF manifest',
'page callback' => 'drupal_get_form',
'page arguments' => array('islandora_mirador_bookreader_generate_json_form'),
'access arguments' => array('administer site configuration'),
'file' => 'includes/admin.form.inc',
'type' => MENU_LOCAL_TASK,
'weight' => 1,
),
);
}
/**
* Implements hook_theme().
*/
function islandora_mirador_bookreader_theme() {
return array(
'islandora_mirador_bookreader' => array(
'file' => 'theme/theme.inc',
'template' => 'theme/islandora-mirador-bookreader',
'variables' => array(
'object' => NULL,
'datastream_id' => 'JP2',
'page_progression' => 'rl',
'pages' => array(),
),
),
'islandora_mirador_bookreader_book_info' => array(
'file' => 'theme/theme.inc',
'variables' => array('object' => NULL),
),
);
}
/**
* Implements hook_islandora_viewer_info().
*/
function islandora_mirador_bookreader_islandora_viewer_info() {
return array(
'islandora_mirador_bookreader' => array(
'label' => t('Mirador BookReader'),
'description' => t('Mirador BookReader.'),
'configuration' => 'admin/islandora/islandora_viewers/mirador_bookreader',
'callback' => 'islandora_mirador_bookreader_viewer_callback',
'model' => array(
'islandora:bookCModel',
'islandora:newspaperIssueCModel',
'islandora:manuscriptCModel',
),
),
);
}
function islandora_mirador_bookreader_viewer_callback(array $params) {
return theme('islandora_mirador_bookreader', $params);
}