public function CDNJS::getVersions in Libraries CDN API 7
Return all available version(s).
Return value
array Return an array with available versions of the library.
Overrides CDNBase::getVersions
File
- src/
Plugin/ LibrariesCDN/ CDNJS.php, line 69 - Plugin: CDNJS.
Class
- CDNJS
- Class CDNJS.
Namespace
Drupal\libraries_cdn\Plugin\LibrariesCDNCode
public function getVersions() {
if (!$this
->isAvailable()) {
return array();
}
$data = $this
->formatData(__FUNCTION__, $this
->query($this
->getURL(__FUNCTION__)));
return array_filter(array_map(function ($v) {
return isset($v['version']) ? $v['version'] : NULL;
}, $data));
}