function dropzonejs_library_info_alter in DropzoneJS 8.2
Same name and namespace in other branches
- 8 dropzonejs.module \dropzonejs_library_info_alter()
Implements hook_library_info_alter().
File
- ./
dropzonejs.module, line 106 - Contains dropzonejs.module.
Code
function dropzonejs_library_info_alter(&$libraries, $extension) {
if ($extension == 'dropzonejs' && \Drupal::moduleHandler()
->moduleExists('libraries')) {
$libraries['dropzonejs']['js'] = [
'/' . libraries_get_path('dropzone') . '/dist/min/dropzone.min.js' => [],
];
$libraries['dropzonejs']['css']['component'] = [
'/' . libraries_get_path('dropzone') . '/dist/min/dropzone.min.css' => [],
];
if ($exif_path = libraries_get_path('exif-js')) {
$libraries['exif-js']['js'] = [
'/' . $exif_path . '/exif.js' => [],
];
}
}
}