public function JSDelivr::__construct in Libraries CDN API 7
Same name and namespace in other branches
- 8 src/Plugin/LibrariesCdn/JsDelivr.php \Drupal\libraries_cdn\Plugin\LibrariesCdn\JSDelivr::__construct()
Overrides CDNBase::__construct
File
- src/
Plugin/ LibrariesCDN/ JSDelivr.php, line 29 - Plugin: jsDelivr.
Class
- JSDelivr
- Class JSDelivr.
Namespace
Drupal\libraries_cdn\Plugin\LibrariesCDNCode
public function __construct(array $configuration, $plugin_id, array $plugin_definition, Drupal7 $drupal7) {
if (empty($configuration['urls'])) {
$configuration['urls'] = array();
}
$configuration['urls'] += array(
'isAvailable' => 'http://api.jsdelivr.com/v1/jsdelivr/libraries/%s',
'getInformation' => 'http://api.jsdelivr.com/v1/jsdelivr/libraries?name=%s&fields=name,mainfile,lastversion,description,homepage,github,author',
'getVersions' => 'http://api.jsdelivr.com/v1/jsdelivr/libraries?name=%s&fields=versions',
'getFiles' => 'http://api.jsdelivr.com/v1/jsdelivr/libraries?name=%s&fields=assets',
'search' => 'http://api.jsdelivr.com/v1/jsdelivr/libraries?name=*%s*',
'convertFiles' => '//cdn.jsdelivr.net/%s/%s/',
);
parent::__construct($configuration, $plugin_id, $plugin_definition, $drupal7);
}