console\controllers\AssetController combineCssFiles()

combineCssFiles() public method Combines CSS files into a single one. public void combineCssFiles ( $inputFiles, $outputFile )$inputFiles array Source file names. $outputFile string Output file name. throws yii\console\Exception on failure.

console\controllers\AssetController compressCssFiles()

compressCssFiles() protected method Compresses given CSS files and combines them into the single one. protected void compressCssFiles ( $inputFiles, $outputFile )$inputFiles array List of source file names. $outputFile string Output file name. throws yii\console\Exception on failure

console\controllers\AssetController buildTarget()

buildTarget() protected method Builds output asset bundle. protected void buildTarget ( $target, $type, $bundles )$target yii\web\AssetBundle Output asset bundle $type string Either 'js' or 'css'. $bundles yii\web\AssetBundle[] Source asset bundles. throws yii\console\Exception on failure.

console\controllers\AssetController actionTemplate()

actionTemplate() public method Creates template of configuration file for actionCompress(). public integer actionTemplate ( $configFile )$configFile string Output file name. return integer CLI exit code throws yii\console\Exception on failure.

console\controllers\AssetController adjustDependency()

adjustDependency() protected method Adjust dependencies between asset bundles in the way source bundles begin to depend on output ones. protected yii\web\AssetBundle[] adjustDependency ( $targets, $bundles )$targets yii\web\AssetBundle[] Output asset bundles. $bundles yii\web\AssetBundle[] Source asset bundles. return yii\web\AssetBundle[] Output asset bundles.

console\controllers\AssetController adjustCssUrl()

adjustCssUrl() protected method Adjusts CSS content allowing URL references pointing to the original resources. protected string adjustCssUrl ( $cssContent, $inputFilePath, $outputFilePath )$cssContent string Source CSS content. $inputFilePath string Input CSS file name. $outputFilePath string Output CSS file name. return string Adjusted CSS content.

console\controllers\AssetController actionCompress()

actionCompress() public method Combines and compresses the asset files according to the given configuration. During the process new asset bundle configuration file will be created. You should replace your original asset bundle configuration with this file in order to use compressed files. public void actionCompress ( $configFile, $bundleFile )$configFile string Configuration file name. $bundleFile string Output asset bundles configuration file name.

console\controllers\AssetController $targets

$targets public property List of asset bundles, which represents output compressed files. You can specify the name of the output compressed file using 'css' and 'js' keys: For example: 'app\config\AllAsset' => [ 'js' => 'js/all-{hash}.js', 'css' => 'css/all-{hash}.css', 'depends' => [ ... ], ] File names can contain placeholder "{hash}", which will be filled by the hash of the resulting file. You may specify several target bundles in order to compress different grou

console\controllers\AssetController $deleteSource

$deleteSource public property (available since version 2.0.10) Whether to delete asset source files after compression. This option affects only those bundles, which have yii\web\AssetBundle::$sourcePath is set. public boolean $deleteSource = false

console\controllers\AssetController $jsCompressor

$jsCompressor public property JavaScript file compressor. If a string, it is treated as shell command template, which should contain placeholders {from} - source file name - and {to} - output file name. Otherwise, it is treated as PHP callback, which should perform the compression. Default value relies on usage of "Closure Compiler" See also https://developers.google.com/closure/compiler/. public string|callable $jsCompressor = 'java -jar compiler.jar --js {from} --js_output_file {to}'