AssetConverterInterface
API reference › yii › web › AssetConverterInterface
Implemented by 1 type
The AssetConverterInterface must be implemented by asset converter classes.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
convert() abstract | Converts a given asset file into a CSS or JS file. | AssetConverterInterface |
Method details
Section titled “Method details”convert()
Section titled “convert() ”abstract public function convert(string $asset, string $basePath): stringConverts a given asset file into a CSS or JS file.
Parameters
| Parameter | Type | Description |
|---|---|---|
$asset | string | The asset file path, relative to $basePath |
$basePath | string | The directory the $asset is relative to. |
Returns
string: The converted asset file path, relative to $basePath.