Elgg  Version 5.1
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Elgg\Assets\CssCompiler Class Reference

Compile CSS with CSSCrush. More...

Public Member Functions

 __construct (Config $config, EventsService $events)
 Constructor. More...
 
 compile ($css, array $options=[])
 Compile CSS. More...
 
 getCssVars (array $compiler_options=[], bool $load_config_vars=true)
 Fetches a combined set of CSS variables and their value. More...
 

Protected Member Functions

 getCoreVars ()
 Default Elgg theme variables. More...
 
 getPluginVars ()
 Plugin theme variables. More...
 

Protected Attributes

Config $config
 
EventsService $events
 

Detailed Description

Compile CSS with CSSCrush.

Definition at line 16 of file CssCompiler.php.

Constructor & Destructor Documentation

Elgg\Assets\CssCompiler::__construct ( Config  $config,
EventsService  $events 
)

Constructor.

Parameters
Config$configConfig
EventsService$eventsEvents service

Definition at line 28 of file CssCompiler.php.

Member Function Documentation

Elgg\Assets\CssCompiler::compile (   $css,
array  $options = [] 
)

Compile CSS.

Parameters
string$cssCSS string
array$optionsCssCrush options
Returns
string

Definition at line 41 of file CssCompiler.php.

Elgg\Assets\CssCompiler::getCoreVars ( )
protected

Default Elgg theme variables.

Returns
array

Definition at line 86 of file CssCompiler.php.

Elgg\Assets\CssCompiler::getCssVars ( array  $compiler_options = [],
bool  $load_config_vars = true 
)

Fetches a combined set of CSS variables and their value.

Parameters
array$compiler_optionscompiler arguments with potential custom variables
bool$load_config_vars(internal) determines if config values are being loaded
Returns
array

Definition at line 67 of file CssCompiler.php.

Elgg\Assets\CssCompiler::getPluginVars ( )
protected

Plugin theme variables.

Returns
array

Definition at line 96 of file CssCompiler.php.

Member Data Documentation

Config Elgg\Assets\CssCompiler::$config
protected

Definition at line 18 of file CssCompiler.php.

EventsService Elgg\Assets\CssCompiler::$events
protected

Definition at line 20 of file CssCompiler.php.


The documentation for this class was generated from the following file: