Web Asset Registry class
- Depuis
- 4.0.0
◆ __construct()
◆ add()
◆ addExtensionRegistryFile()
addExtensionRegistryFile |
( |
string |
$name | ) |
|
Helper method to register new file with Extension Asset(s) info
- Paramètres
-
string | $name | A full extension name, actually a name in the /media folder, eg: com_example, plg_system_example etc. |
- Renvoie
- self
- Depuis
- 4.0.0
Références $name, et $this.
◆ addRegistryFile()
addRegistryFile |
( |
string |
$path | ) |
|
◆ addTemplateRegistryFile()
addTemplateRegistryFile |
( |
string |
$template, |
|
|
int |
$client |
|
) |
| |
Helper method to register new file with Template Asset(s) info
- Paramètres
-
string | $template | The template name |
integer | $client | The application client id |
- Renvoie
- self
- Depuis
- 4.0.0
Références $client, $template, et $this.
◆ createAsset()
createAsset |
( |
string |
$name, |
|
|
string |
$uri = null , |
|
|
array |
$options = [] , |
|
|
array |
$attributes = [] , |
|
|
array |
$dependencies = [] |
|
) |
| |
Prepare new Asset instance.
- Paramètres
-
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 |
- Renvoie
- WebAssetItem
- Depuis
- 4.0.0
Références $attributes, $className, $name, $options, $uri, et null.
◆ dispatchAssetChanged()
Dispatch an event to notify listeners about asset changes: new, remove, override Events:
- onWebAssetRegistryChangedAssetNew When new asset added to the registry
- onWebAssetRegistryChangedAssetOverride When the asset overridden
- onWebAssetRegistryChangedAssetRemove When new asset was removed from the registry
- Paramètres
-
string | $type | Asset type, script or style |
WebAssetItemInterface | $asset | Asset instance |
string | $change | A type of change: new, remove, override |
- Renvoie
- void
- Depuis
- 4.0.0
Références $this, $type, AbstractEvent\create(), et Joomla\CMS\Application\getDispatcher().
◆ exists()
exists |
( |
string |
$type, |
|
|
string |
$name |
|
) |
| |
Check whether the asset exists in the registry.
- Paramètres
-
string | $type | Asset type, script or style |
string | $name | Asset name |
- Renvoie
- boolean
- Depuis
- 4.0.0
Implémente WebAssetRegistryInterface.
Références $name, et $type.
◆ get()
get |
( |
string |
$type, |
|
|
string |
$name |
|
) |
| |
Get an existing Asset from a registry, by asset name.
- Paramètres
-
string | $type | Asset type, script or style |
string | $name | Asset name |
- Renvoie
- WebAssetItem
- Exceptions
-
UnknownAssetException | When Asset cannot be found |
- Depuis
- 4.0.0
Implémente WebAssetRegistryInterface.
Références $name, et $type.
◆ getRegistryFiles()
Get a list of the registry files
- Renvoie
- array
- Depuis
- 4.0.0
◆ parseRegistryFile()
parseRegistryFile |
( |
|
$path | ) |
|
|
protected |
◆ parseRegistryFiles()
Parse registered files
- Renvoie
- void
- Depuis
- 4.0.0
Références $path.
◆ remove()
remove |
( |
string |
$type, |
|
|
string |
$name |
|
) |
| |
◆ $assets
◆ $dataFilesNew
◆ $dataFilesParsed
La documentation de cette classe a été générée à partir du fichier suivant :