Class lajax\assetminifier\Combiner
Inheritance | lajax\assetminifier\Combiner » yii\base\Object |
---|---|
Available since version | 1.0 |
Class for concatenating asset files.
Public Properties
Property | Type | Description | Defined 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
Method | Description | Defined By |
---|---|---|
init() | lajax\assetminifier\Combiner | |
process() | Method to concatenate asset files. | lajax\assetminifier\Combiner |
Protected Methods
Method | Description | Defined 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
Parent library for combined asset files.
Create the corresponding .gz files for asset files.
Enable minification of StyleSheet files.
Enable minification of JavaScript files.
Method Details
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. |
---|
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, |
$position | integer | The position of the AssetBundle. |
Recursive method for grouping asset files.
void combineAssetBundles( $name ) | ||
$name | string | The name of the processed AssetBundle. |
Creating MinifierAsset bundles based on position.
\yii\web\AssetBundle getAssetBundles( $position = null ) | ||
$position | string | Position of asset files. |
void init( ) |
Combination and saving of StyleSheet files.
void mergeCssFiles( $position, $files ) | ||
$position | integer | |
$files | array | List of asset files to be combined. |
Combination and saving of JavaScript files.
void mergeJsFiles( $position, $files ) | ||
$position | integer | |
$files | array | List of asset files to be combined. |
Method to concatenate asset files.
void process( ) |
boolean requiresPjax( ) | ||
return | boolean | Whether the current request requires pjax response from this widget. |
---|
Method to concatenate and save combined Asset.
void saveAssetFiles( ) |
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. |