function public function Theme::getProvider

8.x-3.x Theme.php public Theme::getProvider($provider = NULL)

Retrieves the CDN Provider.

Parameters

string $provider: Optional. A CDN Provider name. If not set, defaults to the CDN provider set in the theme settings.

Return value

\Drupal\bootstrap\Plugin\Provider\ProviderInterface|false A provider instance or FALSE if no provider is set.

Deprecated

in 8.x-3.18, will be removed in a future release.

Class

Theme
Defines a theme object.

Namespace

Drupal\bootstrap

Source src/Theme.php (line 791)

public function getProvider($provider = NULL) {
  $provider = $provider ? : $this->getSetting('cdn_provider');
  $providers = $this->getProviders();
  if (!isset($providers[$provider])) {
    return FALSE;
  }
  return $providers[$provider];
}