ScssController
extends Controller
in package
Table of Contents
- $aliases : array<string|int, mixed>
- $cacheCheckImportResolutions : bool
- $cacheFolder : string
- $cacheLifetime : int
- $cleanDestination : bool
- $disableCache : bool
- $fileName : string
- $forceCacheRefresh : bool
- $hashMethod : string
- $importPaths : array<string|int, mixed>
- $publicFolder : string
- $sourcemaps : string
- $style : string
- actionCompile() : int
- Compile a scss source file into a css destination file for a theme.
- options() : array<string|int, mixed>
- compilerOptions() : array<string|int, mixed>
- Options specific to the compiler
- parseAliases() : bool
- Parse the aliases, make sure they're valid
- parseImportPaths() : bool
- Parse the import paths, resolve aliases and make sure folder exist
Properties
$aliases
public
array<string|int, mixed>
$aliases
= []
Aliases relative to the theme base path, separated by commas "~:foo,#:bar" will convert into ['~' => 'foo', '#' => 'bar'] Those will be added to the theme compiler default aliases
$cacheCheckImportResolutions
public
bool
$cacheCheckImportResolutions
Cache check import resolutions
$cacheFolder
public
string
$cacheFolder
Caching folder. Aliases will be converted
$cacheLifetime
public
int
$cacheLifetime
Cache lifetime in seconds
$cleanDestination
public
bool
$cleanDestination
Clean destination directory before compiling
$disableCache
public
bool
$disableCache
Disables compiler cache
$fileName
public
string
$fileName
Destination file name format
$forceCacheRefresh
public
bool
$forceCacheRefresh
Force cache refresh
$hashMethod
public
string
$hashMethod
Hash method for hashing content and asset names. See https://www.php.net/manual/en/function.hash-algos.php
$importPaths
public
array<string|int, mixed>
$importPaths
= []
Import paths, separated by commas. Aliases will be converted Warning: the import paths will be prepended to the theme compiler default import paths
$publicFolder
public
string
$publicFolder
Public folder. Aliases will be converted.
$sourcemaps
public
string
$sourcemaps
Sourcemaps : 'none', 'inline' or 'file'
$style
public
string
$style
Css output style, 'expanded' or 'compressed'
Methods
actionCompile()
Compile a scss source file into a css destination file for a theme.
public
actionCompile(string $theme, string $srcFile, string $destFile) : int
All options will override the theme's default compiler options.
Parameters
- $theme : string
-
Theme handle
- $srcFile : string
-
Source file, relative to theme base path
- $destFile : string
-
Destination file, relative to public folder
Return values
int —options()
public
options(mixed $actionID) : array<string|int, mixed>
Parameters
- $actionID : mixed
Tags
Return values
array<string|int, mixed> —compilerOptions()
Options specific to the compiler
protected
compilerOptions() : array<string|int, mixed>
Return values
array<string|int, mixed> —parseAliases()
Parse the aliases, make sure they're valid
protected
parseAliases() : bool
Return values
bool —parseImportPaths()
Parse the import paths, resolve aliases and make sure folder exist
protected
parseImportPaths() : bool