-
Notifications
You must be signed in to change notification settings - Fork 1
/
views_mediatable.install
37 lines (32 loc) · 1.19 KB
/
views_mediatable.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
<?php
/**
* @file
* Installation file for Views MediaTable module.
*/
/**
* Implements hook_requirements().
*/
function mediatable_requirements($phase) {
$requirements = array();
$t = get_t();
$requirements['mediatable']['title'] = 'MediaTable';
$requirements['mediatable']['value'] = NULL;
if (file_exists(drupal_get_path('module', 'views_mediatable') . '/MediaTable/jquery.mediaTable.js')) {
$requirements['mediatable']['severity'] = REQUIREMENT_OK;
}
else {
// Required mediatable library wasn't found; abort installation.
$requirements['mediatable']['value'] = $t('Not found');
// Provide a download link to the FooTable jQuery plugin.
$requirements['mediatable']['description'] = $t('The <a href="!mediatable">MediaTable</a> jQuery plugin is missing. See <a href="!readme">README.txt</a> for instructions on how to download and extract it.', array(
'!mediatable' => 'https://github.com/thepeg/MediaTable',
'!readme' => url(drupal_get_path('module', 'mediatable') . '/README.txt'))
);
$requirements['mediatable']['severity'] = REQUIREMENT_ERROR;
}
return $requirements;
}
['mediatable']['severity'] = REQUIREMENT_ERROR;
}
return $requirements;
}