4 * Contains \Drupal\bootstrap\Plugin\Provider\Custom.
7 namespace Drupal\bootstrap\Plugin\Provider;
9 use Drupal\bootstrap\Annotation\BootstrapProvider;
10 use Drupal\Core\Annotation\Translation;
13 * The "custom" CDN provider plugin.
15 * @ingroup plugins_provider
19 * label = @Translation("Custom"),
22 class Custom extends ProviderBase {
27 public function getAssets($types = NULL) {
30 // If no type is set, return all CSS and JS.
32 $types = ['css', 'js'];
34 $types = is_array($types) ? $types : [$types];
36 foreach ($types as $type) {
37 if ($setting = $this->theme->getSetting('cdn_custom_' . $type)) {
38 $this->assets[$type][] = $setting;
40 if ($setting = $this->theme->getSetting('cdn_custom_' . $type . '_min')) {
41 $this->assets['min'][$type][] = $setting;
44 return parent::getAssets($types);