32 public function getCssVars(array $compiler_options = [],
bool $load_config_vars =
true): array {
34 $custom_vars = (array)
elgg_extract(
'vars', $compiler_options, []);
35 $vars = array_merge($default_vars, $custom_vars);
37 $results = (array) $this->events->triggerResults(
'vars:compiler',
'css', $compiler_options,
$vars);
39 if (!$load_config_vars) {
52 $file =
Paths::
elgg() .
'engine/theme.php';
66 $plugin_vars =
$plugin->getStaticConfig(
'theme', []);
67 if (empty($plugin_vars)) {
71 $return = array_merge($return, $plugin_vars);
Gives access to CSS variables in the system.
getCssVars(array $compiler_options=[], bool $load_config_vars=true)
Fetches a combined set of CSS variables and their value.
getPluginVars()
Plugin theme variables.
__construct(protected EventsService $events)
Constructor.
getCoreVars()
Default Elgg theme variables.
Allow executing scripts without $this context or local vars.
static includeFile($file)
Include a file with as little context as possible.
Find Elgg and project paths.
elgg_get_config(string $name, $default=null)
Get an Elgg configuration value.
elgg()
Bootstrapping and helper procedural code available for use in Elgg core and plugins.
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
elgg_get_plugins(string $status='active')
Returns an ordered list of plugins.