Class AssetCollection

Class AssetCollection

Handles Asset objects (JavaScript and CSS). Use the getHtml() method to get the HTML output for the collection. The elements will be outputted in the same order they were added in the collection.

AbstractCollection implements IteratorAggregate, Countable
AssetCollection implements AssetCollectionInterface

Methods summary

public add( AssetInterface $asset )

Adds a new asset to the collection.

public getHtml( StringType $type = null ) : string

Prints the HTML markup for the assets.

public getTranslations( void ) : array

Get all the translation assets as one array.

protected _getValidType( void ) : string

Returns the type of the collection items.

Methods inherited from AbstractCollection

__construct(), _add(), _getExceptionText(), _itemIsValid(), count(), getArray(), getItem(), getIterator(), isEmpty()

Properties summary

Properties inherited from AbstractCollection

$collectionContentArray