Esempio n. 1
0
 /**
  * Gets the default language values.
  *
  * @return array|bool
  *   Returns the default language values for the language configured in
  *   system.site:default_langcode if the corresponding configuration entity
  *   exists, otherwise FALSE.
  */
 protected function getDefaultLanguageValues()
 {
     $config_storage = BootstrapConfigStorageFactory::get();
     $system = $config_storage->read('system.site');
     $default_language = $config_storage->read(static::CONFIG_PREFIX . $system['default_langcode']);
     if (is_array($default_language)) {
         return $default_language;
     }
     return FALSE;
 }
Esempio n. 2
0
 /**
  * Returns the active configuration storage to use during building the container.
  *
  * @return \Drupal\Core\Config\StorageInterface
  */
 protected function getConfigStorage()
 {
     if (!isset($this->configStorage)) {
         // The active configuration storage may not exist yet; e.g., in the early
         // installer. Catch the exception thrown by config_get_config_directory().
         try {
             $this->configStorage = BootstrapConfigStorageFactory::get($this->classLoader);
         } catch (\Exception $e) {
             $this->configStorage = new NullStorage();
         }
     }
     return $this->configStorage;
 }