function public function CdnAssets::getTheme

8.x-3.x CdnAssets.php public CdnAssets::getTheme($theme = NULL)

Retrieves a specific theme.

Parameters

string $theme: The theme to return. If not specified, the first available theme will be returned.

Return value

static

Class

CdnAssets
Class CdnAssets.

Namespace

Drupal\bootstrap\Plugin\Provider

Source src/Plugin/Provider/CdnAssets.php (line 169)

public function getTheme($theme = NULL) {
  $themes = $this->getThemes();
  if (!$theme) {
    return reset($themes) ? : new static();
  }
  if (isset($themes[$theme])) {
    return $themes[$theme];
  }
  return new static();
}