33 public function getCssVars(
bool $load_config_vars =
true): array {
34 if (!isset($this->css_variables)) {
41 if (!$load_config_vars) {
46 if (empty($custom_vars)) {
50 $first_element = $custom_vars[array_key_first($custom_vars)];
51 if (!is_array($first_element)) {
53 $custom_vars = [
'default' => $custom_vars];
56 foreach ($custom_vars as $color_scheme =>
$variables) {
71 $plugin_vars =
$plugin->getStaticConfig(
'theme', []);
72 if (empty($plugin_vars)) {
76 $first_item = $plugin_vars[array_key_first($plugin_vars)];
77 if (!is_array($first_item)) {
79 $plugin_vars = [
'default' => $plugin_vars];
82 foreach ($plugin_vars as $color_scheme =>
$variables) {
84 $this->css_variables[$color_scheme] = $merged_variables;
Gives access to CSS variables in the system.
loadPluginVars()
Loads the plugin theme variables.
getCssVars(bool $load_config_vars=true)
Fetches a combined set of CSS variables and their value.
__construct(protected EventsService $events)
Constructor.
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.
static elgg()
Get the Elgg codebase path with "/".
elgg_get_config(string $name, $default=null)
Get an Elgg configuration value.
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.
if(parse_url(elgg_get_site_url(), PHP_URL_PATH) !=='/') if(file_exists(elgg_get_root_path() . 'robots.txt'))
Set robots.txt.
$variables
Generic form template for install forms.