public function Dummy::__construct in Libraries CDN API 7
Overrides CDNBase::__construct
File
- modules/
libraries_cdn_example_plugin/ src/ Plugin/ LibrariesCDN/ Dummy.php, line 29 - Plugin: jsDelivr.
Class
- Dummy
- Class Dummy.
Namespace
Drupal\libraries_cdn_example_plugin\Plugin\LibrariesCDNCode
public function __construct(array $configuration, $plugin_id, array $plugin_definition, Drupal7 $drupal7) {
if (empty($configuration['urls'])) {
$configuration['urls'] = array();
}
$converFileUrl = url('libraries_cdn/dummy/files', array(
'absolute' => TRUE,
));
$converFileUrl = parse_url($converFileUrl);
array_shift($converFileUrl);
$converFileUrl = implode($converFileUrl);
$configuration['urls'] += array(
'convertFiles' => '//' . $converFileUrl . '/%s/%s/',
);
parent::__construct($configuration, $plugin_id, $plugin_definition, $drupal7);
}