function dropzonejs_library_info_build in DropzoneJS 8
Same name and namespace in other branches
- 8.2 dropzonejs.module \dropzonejs_library_info_build()
Implements hook_library_info_build().
File
- ./
dropzonejs.module, line 65 - Contains dropzonejs.module.
Code
function dropzonejs_library_info_build() {
$libraries = [];
if (\Drupal::moduleHandler()
->moduleExists('libraries')) {
$exif_path = libraries_get_path('exif-js') . '/exif.js';
}
else {
$exif_path = DRUPAL_ROOT . '/libraries/exif-js/exif.js';
}
if ($exif_found = file_exists($exif_path)) {
$libraries['exif-js'] = [
'title' => 'Exif',
'website' => 'https://github.com/exif-js/exif-js',
'version' => 'v2.3.0',
'license' => [
'name' => 'MIT',
'url' => 'https://github.com/exif-js/exif-js/blob/master/LICENSE.md',
'gpl-compatible' => TRUE,
],
'js' => [
'/libraries/exif-js/exif.js' => [],
],
];
}
return $libraries;
}