-
Notifications
You must be signed in to change notification settings - Fork 2
/
islandora_default_thumbs.module
91 lines (82 loc) · 3.02 KB
/
islandora_default_thumbs.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
90
91
<?php
/**
* @file
* Handles the default viewable thumbnail images.
*/
/**
* Implements hook_menu().
*/
function islandora_default_thumbs_menu() {
return array(
'admin/islandora/tools/islandora_default_thumb' => array(
'title' => 'Islandora Default Thumbnail Configuration',
'description' => 'Choose Default Thumbnails',
'page callback' => 'drupal_get_form',
'access arguments' => array('administer site configuration'),
'page arguments' => array('islandora_default_thumbs_admin'),
'file' => 'includes/admin.form.inc',
'type' => MENU_NORMAL_ITEM,
),
);
}
/**
* Implements hook_theme().
*/
function islandora_default_thumbs_theme($existing, $type, $theme, $path) {
return array(
'islandora_default_thumbs_management_table' => array(
'file' => 'theme/theme.inc',
'render element' => 'table',
),
);
}
/**
* Implements hook_preprocess_islandora_basic_collection_grid().
*/
function islandora_default_thumbs_preprocess_islandora_basic_collection_grid(&$variables) {
module_load_include('inc', 'islandora_default_thumbs', 'includes/utilities');
islandora_default_thumbs_prepare_vars_for_page_templates($variables);
}
/**
* Implements hook_preprocess_islandora_basic_collection().
*/
function islandora_default_thumbs_preprocess_islandora_basic_collection(&$variables) {
module_load_include('inc', 'islandora_default_thumbs', 'includes/utilities');
islandora_default_thumbs_prepare_vars_for_page_templates($variables);
}
/**
* Implements hook_preprocess_islandora_objects_grid().
*
* Required to add support to non SPARQL (Legacy) displays.
*/
function islandora_default_thumbs_preprocess_islandora_objects_grid(&$variables) {
module_load_include('inc', 'islandora_default_thumbs', 'includes/utilities');
islandora_default_thumbs_prepare_vars_for_solr_page_template($variables, 'objects', 'standard');
}
/**
* Implements hook_preprocess_islandora_objects_list().
*
* Required to add support to non SPARQL (Legacy) displays.
*/
function islandora_default_thumbs_preprocess_islandora_objects_list(&$variables) {
module_load_include('inc', 'islandora_default_thumbs', 'includes/utilities');
islandora_default_thumbs_prepare_vars_for_solr_page_template($variables, 'objects', 'standard');
}
/**
* Implements hook_preprocess_islandora_solr().
*
* This hook will supply default thumb info to search results.
*/
function islandora_default_thumbs_preprocess_islandora_solr(&$variables) {
module_load_include('inc', 'islandora_default_thumbs', 'includes/utilities');
islandora_default_thumbs_prepare_vars_for_solr_page_template($variables, 'results', 'search');
}
/**
* Implements hook_preprocess_islandora_compound_prev_next().
*
* Adds support for compound object display default thumbnails.
*/
function islandora_default_thumbs_preprocess_islandora_compound_prev_next(&$variables) {
module_load_include('inc', 'islandora_default_thumbs', 'includes/utilities');
islandora_default_thumbs_prepare_vars_for_solr_page_template($variables, 'themed_siblings', 'compound');
}