function file_browser_library_info_alter in File Entity Browser 8
Implements hook_library_info_alter().
File
- ./
file_browser.module, line 71 - Contains hook implementations for file_browser.
Code
function file_browser_library_info_alter(&$libraries, $extension) {
// Optionally use the Libraries module to determine our library paths.
if ($extension == 'file_browser' && \Drupal::moduleHandler()
->moduleExists('libraries')) {
$imagesloaded_path = libraries_get_path('imagesloaded') . '/imagesloaded.pkgd.min.js';
$masonry_path = libraries_get_path('masonry') . '/dist/masonry.pkgd.min.js';
$libraries['imagesloaded']['js'] = [
'/' . $imagesloaded_path => [
'minified' => 'true',
],
];
$libraries['masonry']['js'] = [
'/' . $masonry_path => [
'minified' => 'true',
],
];
}
}