public static function AMPService::libraryInfo in Accelerated Mobile Pages (AMP) 8.3
LibraryInfo.
Parameters
array $libraries: Array of AMP libraries to get info for.
Return value
array The definitions of the AMP libraries used by this components.
1 call to AMPService::libraryInfo()
- AMPService::libraryDescription in src/
Service/ AMPService.php - LibraryDescription.
File
- src/
Service/ AMPService.php, line 213
Class
- AMPService
- Class AMPService.
Namespace
Drupal\amp\ServiceCode
public static function libraryInfo($libraries) {
$library_info = [];
$library_discovery = \Drupal::service('library.discovery');
foreach ($libraries as $library) {
// Explode the library name into extension and library name.
list($extension, $name) = explode('/', $library);
$library_info[$name] = $library_discovery
->getLibraryByName($extension, $name);
}
return $library_info;
}