AssetPackageInterface
API reference › Foxy › Asset › AssetPackageInterface
Implemented by 1 type
Defines mutable access to a frontend package manifest and its Composer-managed dependencies.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
addNewDependencies() abstract | Add the new asset dependencies and return the names of already installed asset dependencies. | AssetPackageInterface |
getInstalledDependencies() abstract | Get the installed asset dependencies. | AssetPackageInterface |
getPackage() abstract | Get the asset package. | AssetPackageInterface |
removeUnusedDependencies() abstract | Remove the unused asset dependencies. | AssetPackageInterface |
setPackage() abstract | Set the asset package. | AssetPackageInterface |
write() abstract | Write the asset package in file. | AssetPackageInterface |
Method details
Section titled “Method details”addNewDependencies()
Section titled “addNewDependencies() ”abstract public function addNewDependencies(array $dependencies): arrayAdd the new asset dependencies and return the names of already installed asset dependencies.
Parameters
| Parameter | Type | Description |
|---|---|---|
$dependencies | array | The asset dependencies |
Returns
array: The asset package name of the already asset dependencies
getInstalledDependencies()
Section titled “getInstalledDependencies() ”abstract public function getInstalledDependencies(): arrayGet the installed asset dependencies.
Returns
array: The installed asset dependencies
getPackage()
Section titled “getPackage() ”abstract public function getPackage(): arrayGet the asset package.
Returns
array
removeUnusedDependencies()
Section titled “removeUnusedDependencies() ”abstract public function removeUnusedDependencies(array $dependencies): selfRemove the unused asset dependencies.
Parameters
| Parameter | Type | Description |
|---|---|---|
$dependencies | array | All asset dependencies |
Returns
self
setPackage()
Section titled “setPackage() ”abstract public function setPackage(array $package): selfSet the asset package.
Parameters
| Parameter | Type | Description |
|---|---|---|
$package | array | The asset package |
Returns
self
write()
Section titled “write() ”abstract public function write(): selfWrite the asset package in file.
Returns
self