WebAssetItemInterface

Web Asset Item interface

Asset Item are "read only" object, all properties must be set through class constructor. Only properties allowed to be edited is an attributes and an options. Changing an uri or a dependencies are not allowed, prefer to create a new asset instance.

since

4.0.0

package

Joomla CMS

Methods

getAttribute

Get the attribute

getAttribute( key,  default = null) : 
since

4.0.0

Arguments

key

stringAn attributes key

default

stringA default value

Response

mixed

getAttributes

Get all attributes

getAttributes() : mixed||string|int
since

4.0.0

Response

array<string|int, mixed>

getDependencies

Return dependencies list

getDependencies() : mixed||string|int
since

4.0.0

Response

array<string|int, mixed>

getName

Return Asset name

getName() : 
since

4.0.0

Response

string

getOption

Get the option

getOption( key,  default = null) : 
since

4.0.0

Arguments

key

stringAn option key

default

stringA default value

Response

mixed

getOptions

Get all options of the asset

getOptions() : mixed||string|int
since

4.0.0

Response

array<string|int, mixed>

getUri

Get the URI of the asset

getUri( resolvePath = true) : 
since

4.0.0

Arguments

resolvePath

boolWhether need to search for a real paths

Response

string

getVersion

Return Asset version

getVersion() : 
since

4.0.0

Response

string

setAttribute

Set the attribute

setAttribute( key,  value = null) : 
since

4.0.0

Arguments

key

stringAn attribute key

value

stringAn attribute value

Response

self

setOption

Set the option

setOption( key,  value = null) : 
since

4.0.0

Arguments

key

stringAn option key

value

stringAn option value

Response

self