KeepaliveAssetItem

Extends WebAssetItem Implements WebAssetAttachBehaviorInterface

Web Asset Item class for Keepalive asset

since

4.0.0

package

Application

Methods

__construct

Class constructor

__construct(string name, string uri = null, array options = [], array attributes = [], array dependencies = []) : mixed
inherited
since

4.0.0

Arguments

name

stringThe asset name

uri

stringThe URI for the asset

options

arrayAdditional options for the asset

attributes

arrayAttributes for the asset

dependencies

arrayAsset dependencies

Response

mixed

getAttribute

Get the attribute

getAttribute(string key, string default = null) : mixed
inherited
since

4.0.0

Arguments

key

stringAn attributes key

default

stringA default value

Response

mixed

getAttributes

Get all attributes

getAttributes() : array
inherited
since

4.0.0

Response

array

getDependencies

Return dependencies list

getDependencies() : array
inherited
since

4.0.0

Response

array

getName

Return Asset name

getName() : string
inherited
since

4.0.0

Response

string

getOption

Get the option

getOption(string key, string default = null) : mixed
inherited
since

4.0.0

Arguments

key

stringAn option key

default

stringA default value

Response

mixed

getOptions

Get all options

getOptions() : array
inherited
since

4.0.0

Response

array

getUri

Get the file path

getUri(bool resolvePath = true) : string
inherited
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() : string
inherited
since

4.0.0

Response

string

isPathAbsolute

Check if the Path is relative to /media folder or absolute

isPathAbsolute(string path) : bool
inherited
since

4.0.0

Arguments

path

stringPath to test

Response

bool

isPathExternal

Check if the Path is External

isPathExternal(string path) : bool
inherited
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) : void

Useful for Asset to add a Script options.

since

4.0.0

Arguments

doc

\Joomla\CMS\Document\DocumentActive document

resolvePath

Resolve path

resolvePath(string path, string type) : string
inherited
since

4.0.0

Arguments

path

stringThe path to resolve

type

stringThe resolver method

Response

string

setAttribute

Set the attribute

setAttribute(string key, string value = null) : self
inherited
since

4.0.0

Arguments

key

stringAn attribute key

value

stringAn attribute value

Response

self

setOption

Set the option

setOption(string key, string value = null) : self
inherited
since

4.0.0

Arguments

key

stringAn option key

value

stringAn option value

Response

self

Properties

name

Asset name

inherited
since

4.0.0

Type(s)

string

uri

The URI for the asset

inherited
since

4.0.0

Type(s)

string

options

Additional options for the asset

inherited
since

4.0.0

Type(s)

array

attributes

Attributes for the asset, to be rendered in the asset's HTML tag

inherited
since

4.0.0

Type(s)

array

dependencies

Asset dependencies

inherited
since

4.0.0

Type(s)

string[]

version

Asset version

inherited
since

4.0.0

Type(s)

string