function animate_css_install in Animate CSS 8
Implements hook_install().
File
- ./
animate_css.install, line 15 - Requirements page for Animate Css.
Code
function animate_css_install() {
// Check for Animate Library.
$library = \Drupal::service('library.discovery')
->getLibraryByName('animate_css', 'animate');
$library_exists = file_exists(DRUPAL_ROOT . '/' . $library['css'][0]['data']);
if (!$library_exists) {
MessengerInterface::addMessage(t('Animate CSS module requires the animate library. <a href=":anim_link">Download animate library</a> and unzip into /libraries/animate.css.', [
':anim_link' => DOWNLOAD_URL,
]));
}
}