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.
category |
System |
---|---|
package |
Http |
subpackage |
Collections |
__construct(array|mixed|null $argumentsArray = null)
Throws |
|
---|
array|mixed|null
_add(mixed $item)
This method must be used by child-collection classes.
Throws |
|
---|
mixed
Item which should add to the collection
_getExceptionText() : string
string
_getValidType() : string
This method must be implemented in the child-collection classes.
string
_itemIsValid(mixed $dataItem) : boolean
mixed
boolean
count() : integer
integer
getArray() : array
array
getHtml(\StringType $type = null) : string
\StringType
(optional) You can provide either Asset::JAVASCRIPT, Asset::CSS or Asset::TRANSLATION in order to get the HTML only for a specific type of assets.
string
Returns the HTML markup of the assets.
getItem( $p_index) : mixed
Throws |
|
---|
mixed
getIterator()
getTranslations() : array
This array can then be used in frontend from JavaScript (JS Engine or plain scripts).
array
isEmpty() : boolean
boolean
collectionContentArray : array
var |
---|
array