function hook_libraries_locator_info_alter in Libraries API 8.3
Alter library locator information.
Parameters
array $locators: An array of library locators keyed by ID. Each locator is an array with the following keys:
- id: The ID of the library locator.
- class: The class to use for this library locator.
- provider: The provider of this library locator.
1 invocation of hook_libraries_locator_info_alter()
- LocatorManager::__construct in src/
ExternalLibrary/ Local/ LocatorManager.php - Constructs a locator manager.
File
- ./
libraries.api.php, line 148 - Documents API functions for Libraries module.
Code
function hook_libraries_locator_info_alter(array &$locators) {
// Use a different class for the stream locator.
$locators['stream']['class'] = 'Drupal\\mymodule\\ExternalLibrary\\BetterStreamLocator';
}