function asset_injector_library_info_build in Asset Injector 8
Same name and namespace in other branches
- 8.2 asset_injector.module \asset_injector_library_info_build()
Implements hook_library_info_build().
Map the library IDs defined in actual assets. Note that drupal prefixes the IDs with our module name so we must not do that here.
See also
asset_injector_page_attachments() to the
File
- ./
asset_injector.module, line 79 - Contains module asset_injector.
Code
function asset_injector_library_info_build() {
$libraries = [];
foreach (asset_injector_get_assets() as $asset) {
$libraries[$asset
->libraryNameSuffix()] = $asset
->libraryInfo();
}
\Drupal::moduleHandler()
->alter('asset_injector_library_info_build', $libraries);
return $libraries;
}