public function AssetCollectionInterface::replaceLeaf

Replaces an existing leaf with a new one.

Parameters

AssetInterface $needle The current asset to replace:

AssetInterface $replacement The new asset:

Throws

InvalidArgumentException If the asset cannot be found

1 method overrides AssetCollectionInterface::replaceLeaf()
AssetCollection::replaceLeaf in drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollection.php
Replaces an existing leaf with a new one.

File

drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollectionInterface.php, line 52

Class

AssetCollectionInterface
An asset collection.

Namespace

Assetic\Asset

Code

public function replaceLeaf(AssetInterface $needle, AssetInterface $replacement);