web\AssetManager $bundles

$bundles public property List of asset bundle configurations. This property is provided to customize asset bundles. When a bundle is being loaded by getBundle(), if it has a corresponding configuration specified here, the configuration will be applied to the bundle. The array keys are the asset bundle names, which typically are asset bundle class names without leading backslash. The array values are the corresponding configurations. If a value is false, it means the corresponding asset bund

web\AssetManager $beforeCopy

$beforeCopy public property A PHP callback that is called before copying each sub-directory or file. This option is used only when publishing a directory. If the callback returns false, the copy operation for the sub-directory or file will be cancelled. The signature of the callback should be: function ($from, $to), where $from is the sub-directory or file to be copied from, while $to is the copy target. This is passed as a parameter beforeCopy to yii\helpers\FileHelper::copyDirectory(). p

web\AssetManager $baseUrl

$baseUrl public property The base URL through which the published asset files can be accessed. public string $baseUrl = '@web/assets'

web\AssetManager $basePath

$basePath public property The root directory storing the published asset files. public string $basePath = '@webroot/assets'

web\AssetManager $assetMap

$assetMap public property Mapping from source asset files (keys) to target asset files (values). This property is provided to support fixing incorrect asset file paths in some asset bundles. When an asset bundle is registered with a view, each relative asset file in its css and js arrays will be examined against this map. If any of the keys is found to be the last part of an asset file (which is prefixed with yii\web\AssetBundle::$sourcePath if available), the corresponding value will repla

web\AssetManager $appendTimestamp

$appendTimestamp public property (available since version 2.0.3) Whether to append a timestamp to the URL of every published asset. When this is true, the URL of a published asset may look like /path/to/asset?v=timestamp, where timestamp is the last modification time of the published asset file. You normally would want to set this property to true when you have enabled HTTP caching for assets, because it allows you to bust caching when the assets are updated. public boolean $appendTimestam

web\AssetManager $afterCopy

$afterCopy public property A PHP callback that is called after a sub-directory or file is successfully copied. This option is used only when publishing a directory. The signature of the callback is the same as for $beforeCopy. This is passed as a parameter afterCopy to yii\helpers\FileHelper::copyDirectory(). public callback $afterCopy = null

web\AssetConverterInterface convert()

convert() public abstract method Converts a given asset file into a CSS or JS file. public abstract string convert ( $asset, $basePath )$asset string The asset file path, relative to $basePath $basePath string The directory the $asset is relative to. return string The converted asset file path, relative to $basePath.

web\AssetConverter runCommand()

runCommand() protected method Runs a command to convert asset files. protected boolean runCommand ( $command, $basePath, $asset, $result )$command string The command to run. If prefixed with an @ it will be treated as a path alias. $basePath string Asset base path and command working directory $asset string The name of the asset file $result string The name of the file to be generated by the converter command return boolean True on success, false on failure. Failures will be logg

web\AssetConverter convert()

convert() public method Converts a given asset file into a CSS or JS file. public string convert ( $asset, $basePath )$asset string The asset file path, relative to $basePath $basePath string The directory the $asset is relative to. return string The converted asset file path, relative to $basePath.