function public function CdnAssets::append

8.x-3.x CdnAssets.php public CdnAssets::append(CdnAsset $asset)

Appends a CdnAsset object to the list.

Parameters

\Drupal\bootstrap\Plugin\Provider\CdnAsset $asset: A CdnAsset object.

Class

CdnAssets
Class CdnAssets.

Namespace

Drupal\bootstrap\Plugin\Provider

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

public function append(CdnAsset $asset) {
  if (isset($this->assets[$asset->getId()])) {
    $this->assets[$asset->getId()] = $asset;
  }
  else {
    $this->assets = array_merge($this->assets, [$asset->getId() => $asset]);
  }
}