function public function ProviderBase::getCdnVersions

8.x-3.x ProviderBase.php public ProviderBase::getCdnVersions()
7.x-3.x ProviderBase.php public ProviderBase::getCdnVersions()

Retrieves the versions supported by the CDN Provider.

Return value

array|false An associative array of versions, also keyed by the version.

Overrides ProviderInterface::getCdnVersions

Class

ProviderBase
CDN Provider base class.

Namespace

Drupal\bootstrap\Plugin\Provider

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

public function getCdnVersions() {
  // Immediately return if the CDN Provider does not support versions.
  if (!$this->supportsVersions()) {
    return [];
  }

  if (!isset($this->versions)) {
    $hash = Crypt::generateBase64HashIdentifier($this->getCdnVersionsCacheData());
    $this->versions = $this->cacheGet('versions', $hash, [], function() {
      return $this->discoverCdnVersions();
    });
  }
  return $this->versions;
}