-
Notifications
You must be signed in to change notification settings - Fork 40
/
islandora_openseadragon.install
40 lines (37 loc) · 1.15 KB
/
islandora_openseadragon.install
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
<?php
/**
* @file
* Install hooks for this module.
*/
/**
* Implements hook_requirements().
*/
function islandora_openseadragon_requirements() {
$requirements = array();
// Ensure translations don't break at install time.
$t = get_t();
if (!function_exists('libraries_get_libraries')) {
module_enable(array('libraries'));
}
if (!in_array('openseadragon', array_keys(libraries_get_libraries()))) {
$readme_link = l($t('README'), drupal_get_path('module', 'islandora_openseadragon') . '/README.txt');
$requirements['openseadragon'] = array(
'title' => $t('OpenSeadragon library'),
'description' => $t('OpenSeadragon library missing; please consult the !readme for installation instructions.', array('!readme' => $readme_link)),
'severity' => REQUIREMENT_ERROR,
);
}
return $requirements;
}
/**
* Implements hook_uninstall().
*/
function islandora_openseadragon_uninstall() {
$variables = array(
'islandora_openseadragon_settings',
'islandora_openseadragon_tile_size',
'islandora_openseadragon_tile_overlap',
'islandora_openseadragon_fit_to_aspect_ratio',
);
array_walk($variables, 'variable_del');
}