public static function LibrariesCDN::find in Libraries CDN API 7
Same name and namespace in other branches
- 8 src/LibrariesCdn.php \Drupal\libraries_cdn\LibrariesCdn::find()
Return CDN Plugin id's of the CDN who provides a library.
Parameters
string $library: The library to search.
Return value
array $providers The array of providers who provides the searched library.
File
- src/
LibrariesCDN.php, line 57 - Contains LibrariesCDN.
Class
- LibrariesCDN
- Class LibrariesCDN.
Namespace
Drupal\libraries_cdnCode
public static function find($library) {
$providers = array();
foreach (self::getAvailableCDN() as $cdn) {
self::setPlugin($cdn, $library);
if (self::isAvailable()) {
$providers[] = $cdn;
}
}
return $providers;
}