function mediatable_requirements in Views MediaTable 7
Implements hook_requirements().
File
- ./
views_mediatable.install, line 11 - Installation file for Views MediaTable module.
Code
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;
}