Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
__construct (string $name, string $uri=null, array $options=[], array $attributes=[], array $dependencies=[]) | |
getName () | |
getVersion () | |
getDependencies () | |
getUri ($resolvePath=true) | |
getOption (string $key, $default=null) | |
setOption (string $key, $value=null) | |
getOptions () | |
getAttribute (string $key, $default=null) | |
setAttribute (string $key, $value=null) | |
getAttributes () | |
Fonctions membres protégées | |
resolvePath (string $path, string $type) | |
isPathExternal (string $path) | |
isPathAbsolute (string $path) | |
Attributs protégés | |
$name = '' | |
$uri = '' | |
$options = [] | |
$attributes = [] | |
$dependencies = [] | |
$version = 'auto' | |
Web Asset Item class
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.
__construct | ( | string | $name, |
string | $uri = null , |
||
array | $options = [] , |
||
array | $attributes = [] , |
||
array | $dependencies = [] |
||
) |
Class constructor
string | $name | The asset name |
string | $uri | The URI for the asset |
array | $options | Additional options for the asset |
array | $attributes | Attributes for the asset |
array | $dependencies | Asset dependencies |
Références $attributes, $name, $options, $uri, et name.
getAttribute | ( | string | $key, |
$default = null |
|||
) |
Get the attribute
string | $key | An attributes key |
string | $default | A default value |
Implémente WebAssetItemInterface.
getAttributes | ( | ) |
Get all attributes
Implémente WebAssetItemInterface.
Références $attributes.
getDependencies | ( | ) |
getName | ( | ) |
getOption | ( | string | $key, |
$default = null |
|||
) |
Get the option
string | $key | An option key |
string | $default | A default value |
Implémente WebAssetItemInterface.
getOptions | ( | ) |
getUri | ( | $resolvePath = true | ) |
Get the file path
boolean | $resolvePath | Whether need to search for a real paths |
Implémente WebAssetItemInterface.
getVersion | ( | ) |
Return Asset version
Implémente WebAssetItemInterface.
Références $version.
|
protected |
Check if the Path is relative to /media folder or absolute
string | $path | Path to test |
Références $path, et JPATH_ROOT.
|
protected |
Check if the Path is External
string | $path | Path to test |
Références $path.
|
protected |
Resolve path
string | $path | The path to resolve |
string | $type | The resolver method |
Références $path, $type, et HTMLHelper\_().
setAttribute | ( | string | $key, |
$value = null |
|||
) |
Set the attribute
string | $key | An attribute key |
string | $value | An attribute value |
Implémente WebAssetItemInterface.
setOption | ( | string | $key, |
$value = null |
|||
) |
Set the option
string | $key | An option key |
string | $value | An option value |
Implémente WebAssetItemInterface.
|
protected |
|
protected |
|
protected |
Asset name
|
protected |
|
protected |
|
protected |