CssCollectionOptimizer
class CssCollectionOptimizer implements AssetCollectionOptimizerInterface (View source)
Optimizes CSS assets.
Properties
| protected CssCollectionGrouper | $grouper | A CSS asset grouper. |
|
| protected CssOptimizer | $optimizer | A CSS asset optimizer. |
|
| protected AssetDumper | $dumper | An asset dumper. |
|
| protected StateInterface | $state | The state key/value store. |
|
| protected FileSystemInterface | $fileSystem | The file system service. |
Methods
__construct(AssetCollectionGrouperInterface $grouper, AssetOptimizerInterface $optimizer, AssetDumperInterface $dumper, StateInterface $state, FileSystemInterface $file_system)
Constructs a CssCollectionOptimizer.
array
optimize(array $css_assets)
Optimizes a collection of assets.
string
generateHash(array $css_group)
Generate a hash for a given group of CSS assets.
string[]
getAll()
Returns all optimized asset collections assets.
deleteAll()
Deletes all optimized asset collections assets.
Details
__construct(AssetCollectionGrouperInterface $grouper, AssetOptimizerInterface $optimizer, AssetDumperInterface $dumper, StateInterface $state, FileSystemInterface $file_system)
Constructs a CssCollectionOptimizer.
array
optimize(array $css_assets)
Optimizes a collection of assets.
protected string
generateHash(array $css_group)
Generate a hash for a given group of CSS assets.
string[]
getAll()
Returns all optimized asset collections assets.
deleteAll()
Deletes all optimized asset collections assets.