44 'formatter' =>
'single-line',
45 'versioning' =>
false,
46 'rewrite_import_urls' =>
false,
47 'boilerplate' =>
false,
50 $config = (array) $this->config->css_compiler_options;
56 return Crush::$process->compile()->__toString();
67 public function getCssVars(array $compiler_options = [],
bool $load_config_vars =
true): array {
69 $custom_vars = (array)
elgg_extract(
'vars', $compiler_options, []);
70 $vars = array_merge($default_vars, $custom_vars);
72 $results = (array) $this->events->triggerResults(
'vars:compiler',
'css', $compiler_options,
$vars);
74 if (!$load_config_vars) {
101 $plugin_vars = $plugin->getStaticConfig(
'theme', []);
102 if (empty($plugin_vars)) {
106 $return = array_merge($return, $plugin_vars);
static includeFile($file)
Include a file with as little context as possible.
elgg_get_plugins(string $status= 'active')
Returns an ordered list of plugins.
static elgg()
Get the Elgg codebase path with "/".
getCoreVars()
Default Elgg theme variables.
elgg_get_config(string $name, $default=null)
Get an Elgg configuration value.
__construct(Config $config, EventsService $events)
Constructor.
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
getPluginVars()
Plugin theme variables.
compile($css, array $options=[])
Compile CSS.
Compile CSS with CSSCrush.
getCssVars(array $compiler_options=[], bool $load_config_vars=true)
Fetches a combined set of CSS variables and their value.