You are here

public function SiteSettingsLoader::loadAll in Site Settings and Labels 8

Load site settings by fieldset.

Parameters

bool $rebuild_cache: Force rebuilding of the cache by setting to true.

Return value

array All settings.

1 call to SiteSettingsLoader::loadAll()
SiteSettingsLoader::loadByFieldset in src/SiteSettingsLoader.php
Load site settings by fieldset.

File

src/SiteSettingsLoader.php, line 85

Class

SiteSettingsLoader
Class SiteSettingsLoader.

Namespace

Drupal\site_settings

Code

public function loadAll($rebuild_cache = FALSE) {
  $langcode = $this->languageManager
    ->getCurrentLanguage()
    ->getId();
  if (!$rebuild_cache && ($cache = \Drupal::cache(self::SITE_SETTINGS_CACHE_BIN)
    ->get(self::SITE_SETTINGS_CACHE_CID . ':' . $langcode))) {
    $this->settings = $cache->data;
  }
  else {
    $this
      ->rebuildCache($langcode);
  }
  return $this->settings;
}