You are here

function hook_libraries_version_detector_info_alter in Libraries API 8.3

Alter library version detector information.

Parameters

array $version_detectors: An array of library version detectors keyed by ID. Each detector is an array with the following keys:

  • id: The ID of the library version detector.
  • class: The class to use for this library version detector.
  • provider: The provider of this library version detector.
1 invocation of hook_libraries_version_detector_info_alter()
VersionDetectorManager::__construct in src/ExternalLibrary/Version/VersionDetectorManager.php
Constructs a version detector manager.

File

./libraries.api.php, line 163
Documents API functions for Libraries module.

Code

function hook_libraries_version_detector_info_alter(array &$version_detectors) {

  // Use a different class for the line pattern locator.
  $version_detectors['line_pattern']['class'] = 'Drupal\\mymodule\\ExternalLibrary\\BetterLinePatternDetector';
}