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(string key, string default = null) : mixed
since |
4.0.0 |
---|
Arguments
- key
string
An attributes key- default
string
A default value
Response
mixed
getAttributes
Get all attributes
getAttributes() : array
since |
4.0.0 |
---|
Response
array
getDependencies
Return dependencies list
getDependencies() : array
since |
4.0.0 |
---|
Response
array
getName
Return Asset name
getName() : string
since |
4.0.0 |
---|
Response
string
getOption
Get the option
getOption(string key, string default = null) : mixed
since |
4.0.0 |
---|
Arguments
- key
string
An option key- default
string
A default value
Response
mixed
getOptions
Get all options of the asset
getOptions() : array
since |
4.0.0 |
---|
Response
array
getUri
Get the URI of the asset
getUri(bool resolvePath = true) : string
since |
4.0.0 |
---|
Arguments
- resolvePath
bool
Whether need to search for a real paths
Response
string
getVersion
Return Asset version
getVersion() : string
since |
4.0.0 |
---|
Response
string
setAttribute
Set the attribute
setAttribute(string key, string value = null) : self
since |
4.0.0 |
---|
Arguments
- key
string
An attribute key- value
string
An attribute value
Response
self
setOption
Set the option
setOption(string key, string value = null) : self
since |
4.0.0 |
---|
Arguments
- key
string
An option key- value
string
An option value
Response
self