3 namespace Drupal\bootstrap\Plugin\Provider;
6 * The "custom" CDN provider plugin.
8 * @ingroup plugins_provider
12 * label = @Translation("Custom"),
15 class Custom extends ProviderBase {
20 public function getAssets($types = NULL) {
23 // If no type is set, return all CSS and JS.
25 $types = ['css', 'js'];
27 $types = is_array($types) ? $types : [$types];
29 foreach ($types as $type) {
30 if ($setting = $this->theme->getSetting('cdn_custom_' . $type)) {
31 $this->assets[$type][] = $setting;
33 if ($setting = $this->theme->getSetting('cdn_custom_' . $type . '_min')) {
34 $this->assets['min'][$type][] = $setting;
37 return parent::getAssets($types);