function public static function ProviderManager::load

8.x-3.x ProviderManager.php public static ProviderManager::load($theme = NULL, $provider = NULL, array $configuration = [])

Loads a CDN Provider.

Parameters

\Drupal\bootstrap\Theme|string $theme: Optional. A theme to associate with the provider. If not set, the active theme will be used.

string $provider: Optional. The ID of the provider to load. If not set, the provider set on the supplied or active $theme will be used.

array $configuration: Optional. An array of configuration relevant to the plugin instance.

Return value

\Drupal\bootstrap\Plugin\Provider\ProviderInterface A CDN Provider instance.

Class

ProviderManager
Manages discovery and instantiation of Bootstrap CDN Providers.

Namespace

Drupal\bootstrap\Plugin

Source src/Plugin/ProviderManager.php (line 101)

public static function load($theme = NULL, $provider = NULL, array $configuration = []) {
  $theme = Bootstrap::getTheme($theme);
  return (new static($theme))->get(isset($provider) ? $provider : $theme->getSetting('cdn_provider'), $configuration + ['theme' => $theme]);
}