function protected function ProviderBase::getCdnAssetsCacheData

8.x-3.x ProviderBase.php protected ProviderBase::getCdnAssetsCacheData($version = NULL, $theme = NULL)

Retrieves the data used to create a hash for CDN Assets.

Parameters

string $version: Optional. A specific version to use.

string $theme: Optional. A specific theme to use.

Return value

array An array of components that will be serialized and hashed.

Class

ProviderBase
CDN Provider base class.

Namespace

Drupal\bootstrap\Plugin\Provider

Source src/Plugin/Provider/ProviderBase.php (line 317)

protected function getCdnAssetsCacheData($version = NULL, $theme = NULL) {
  if (!isset($version) && $this->supportsVersions()) {
    $version = $this->getCdnVersion();
  }
  if (!isset($theme) && $this->supportsThemes()) {
    $theme = $this->getCdnTheme();
  }
  return [
    'ttl' => $this->getCacheTtl(static::CACHE_LIBRARY),
    'min' => [
      'css' => !!\Drupal::config('system.performance')->get('css.preprocess'),
      'js' => !!\Drupal::config('system.performance')->get('js.preprocess'),
    ],
    'provider' => $this->pluginId,
    'version' => $version,
    'theme' => $theme,
  ];
}