function hook_libraries_library_type_info_alter in Libraries API 8.3
Alter library type information.
Parameters
array $library_types: An array of library types keyed by ID. Each library type is an array with the following keys:
- id: The ID of the library type.
- class: The class to use for this library type.
- provider: The provider of this library type.
1 invocation of hook_libraries_library_type_info_alter()
- LibraryTypeFactory::__construct in src/
ExternalLibrary/ Type/ LibraryTypeFactory.php - Constructs a locator manager.
File
- ./
libraries.api.php, line 132 - Documents API functions for Libraries module.
Code
function hook_libraries_library_type_info_alter(array &$library_types) {
// Use a different class for the asset library type. Note that this class is
// distinct from the class actually for asset libraries themselves.
$library_types['asset']['class'] = 'Drupal\\mymodule\\ExternalLibrary\\BetterAssetLibraryType';
}