baguettebox.install in baguetteBox.js 8
Same filename and directory in other branches
Install functions for the baguettebox module.
File
baguettebox.installView source
<?php
/**
* @file
* Install functions for the baguettebox module.
*/
/**
* Implements hook_requirements().
*/
function baguettebox_requirements($phase) {
$requirements = [];
if ($phase == 'runtime') {
if (!file_exists('libraries/baguettebox/baguetteBox.min.js')) {
$requirements['baguettebox_library'] = [
'title' => t('BaguetteBox library'),
'value' => t('Not found'),
'severity' => REQUIREMENT_ERROR,
'description' => t('You need to download the <a href=":library_url">baguetteBox library</a> and extract the archive to the <em>libraries/baguettebox</em> directory on your server.', [
':library_url' => 'https://github.com/feimosi/baguetteBox.js',
]),
];
}
}
return $requirements;
}
Functions
Name | Description |
---|---|
baguettebox_requirements | Implements hook_requirements(). |