KeepaliveAssetItem
Extends WebAssetItem Implements WebAssetAttachBehaviorInterfaceWeb Asset Item class for Keepalive asset
| since |
4.0.0 |
|---|---|
| package |
Joomla CMS |
Methods
__construct
Class constructor
__construct( name, uri = null, mixed||string|int options = [], mixed||string|int attributes = [], mixed||string|int dependencies = []) :
| since |
4.0.0 |
|---|
Arguments
- name
stringThe asset name- uri
stringThe URI for the asset- options
array<string|int, mixed>Additional options for the asset- attributes
array<string|int, mixed>Attributes for the asset- dependencies
array<string|int, mixed>Asset dependencies
Response
mixed
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
getOptions() : mixed||string|int
| since |
4.0.0 |
|---|
Response
array<string|int, mixed>
getUri
Get the file path
getUri( resolvePath = true) :
| since |
4.0.0 |
|---|
Arguments
- resolvePath
boolWhether need to search for a real paths
Response
stringThe resolved path if resolved, else an empty string.
getVersion
Return Asset version
getVersion() :
| since |
4.0.0 |
|---|
Response
string
isPathAbsolute
Check if the Path is relative to /media folder or absolute
isPathAbsolute( path) :
| since |
4.0.0 |
|---|
Arguments
- path
stringPath to test
Response
bool
isPathExternal
Check if the Path is External
isPathExternal( path) :
| since |
4.0.0 |
|---|
Arguments
- path
stringPath to test
Response
bool
onAttachCallback
Method called when asset attached to the Document.
onAttachCallback(\Joomla\CMS\Document\Document doc) :
Useful for Asset to add a Script options.
| since |
4.0.0 |
|---|
Arguments
- doc
DocumentActive document
Response
void
resolvePath
Resolve path
resolvePath( path, type) :
| since |
4.0.0 |
|---|
Arguments
- path
stringThe path to resolve- type
stringThe resolver method
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
Properties
name
Asset name
| since |
4.0.0 |
|---|
Type(s)
string
uri
The URI for the asset
| since |
4.0.0 |
|---|
Type(s)
string
options
Additional options for the asset
| since |
4.0.0 |
|---|
Type(s)
array<string|int, mixed>
attributes
Attributes for the asset, to be rendered in the asset's HTML tag
| since |
4.0.0 |
|---|
Type(s)
array<string|int, mixed>
dependencies
Asset dependencies
| since |
4.0.0 |
|---|
Type(s)
array<string|int, string>
version
Asset version
| since |
4.0.0 |
|---|
Type(s)
string