Class lajax\assetminifier\Combiner

Inheritancelajax\assetminifier\Combiner » yii\base\Object
Available since version1.0

Class for concatenating asset files.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$combinedFilesPath string Parent library for combined asset files. lajax\assetminifier\Combiner
$createGz boolean Create the corresponding . lajax\assetminifier\Combiner
$minifiedCss boolean Enable minification of StyleSheet files. lajax\assetminifier\Combiner
$minifiedJs boolean Enable minification of JavaScript files. lajax\assetminifier\Combiner

Public Methods

Hide inherited methods

MethodDescriptionDefined By
init() lajax\assetminifier\Combiner
process() Method to concatenate asset files. lajax\assetminifier\Combiner

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
adjustCssUrl() Adjusts CSS content allowing URL references pointing to the original resources. lajax\assetminifier\Combiner
combineAssetBundle() Combining asset files depending on type. lajax\assetminifier\Combiner
combineAssetBundles() Recursive method for grouping asset files. lajax\assetminifier\Combiner
getAssetBundles() Creating MinifierAsset bundles based on position. lajax\assetminifier\Combiner
mergeCssFiles() Combination and saving of StyleSheet files. lajax\assetminifier\Combiner
mergeJsFiles() Combination and saving of JavaScript files. lajax\assetminifier\Combiner
requiresPjax() lajax\assetminifier\Combiner
saveAssetFiles() Method to concatenate and save combined Asset. lajax\assetminifier\Combiner
saveFile() Saving merged and combined asset files to disk. lajax\assetminifier\Combiner

Property Details

$combinedFilesPath public property
string $combinedFilesPath '/lajax-asset-minifier'

Parent library for combined asset files.

$createGz public property

Create the corresponding .gz files for asset files.

$minifiedCss public property

Enable minification of StyleSheet files.

$minifiedJs public property

Enable minification of JavaScript files.

Method Details

adjustCssUrl() protected method

Adjusts CSS content allowing URL references pointing to the original resources.

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.

combineAssetBundle() protected method

Combining asset files depending on type.

void combineAssetBundle$assetBundle$property$position )
$assetBundle \yii\web\AssetBundle

The AssetBundle to be processed.

$property string

The type of the assets to be processed, css or js.

$position integer

The position of the AssetBundle.

combineAssetBundles() protected method

Recursive method for grouping asset files.

void combineAssetBundles$name )
$name string

The name of the processed AssetBundle.

getAssetBundles() protected method

Creating MinifierAsset bundles based on position.

\yii\web\AssetBundle getAssetBundles$position null )
$position string

Position of asset files.

init() public method

void init( )
mergeCssFiles() protected method

Combination and saving of StyleSheet files.

void mergeCssFiles$position$files )
$position integer
$files array

List of asset files to be combined.

mergeJsFiles() protected method

Combination and saving of JavaScript files.

void mergeJsFiles$position$files )
$position integer
$files array

List of asset files to be combined.

process() public method

Method to concatenate asset files.

void process( )
requiresPjax() protected method

boolean requiresPjax( )
return boolean

Whether the current request requires pjax response from this widget.

saveAssetFiles() protected method

Method to concatenate and save combined Asset.

void saveAssetFiles( )
saveFile() protected method

Saving merged and combined asset files to disk.

void saveFile$path$content )
$path string

Path of the new asset file.

$content string

Content of the new asset file.