public function AssetCollection::add

Adds an asset to the current collection.

Parameters

AssetInterface $asset An asset:

Overrides AssetCollectionInterface::add

2 calls to AssetCollection::add()
AssetCollection::__construct in drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollection.php
Constructor.
GlobAsset::initialize in drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Asset/GlobAsset.php
Initializes the collection based on the glob(s) passed in.

File

drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollection.php, line 61

Class

AssetCollection
A collection of assets.

Namespace

Assetic\Asset

Code

public function add(AssetInterface $asset) {
  $this->assets[] = $asset;
}