
| Current Path : /var/www/html/wirtschaftsclub.web-klick.de/themes/bootstrap/src/Plugin/Provider/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/wirtschaftsclub.web-klick.de/themes/bootstrap/src/Plugin/Provider/Custom.php |
<?php
namespace Drupal\bootstrap\Plugin\Provider;
/**
* The "custom" CDN provider plugin.
*
* @ingroup plugins_provider
*
* @BootstrapProvider(
* id = "custom",
* label = @Translation("Custom"),
* )
*/
class Custom extends ProviderBase {
/**
* {@inheritdoc}
*/
public function getAssets($types = NULL) {
$this->assets = [];
// If no type is set, return all CSS and JS.
if (!isset($types)) {
$types = ['css', 'js'];
}
$types = is_array($types) ? $types : [$types];
foreach ($types as $type) {
if ($setting = $this->theme->getSetting('cdn_custom_' . $type)) {
$this->assets[$type][] = $setting;
}
if ($setting = $this->theme->getSetting('cdn_custom_' . $type . '_min')) {
$this->assets['min'][$type][] = $setting;
}
}
return parent::getAssets($types);
}
}