function BootstrapConfigStorageFactory::get

Same name in other branches
  1. 9 core/lib/Drupal/Core/Config/BootstrapConfigStorageFactory.php \Drupal\Core\Config\BootstrapConfigStorageFactory::get()
  2. 8.9.x core/lib/Drupal/Core/Config/BootstrapConfigStorageFactory.php \Drupal\Core\Config\BootstrapConfigStorageFactory::get()
  3. 10 core/lib/Drupal/Core/Config/BootstrapConfigStorageFactory.php \Drupal\Core\Config\BootstrapConfigStorageFactory::get()

Returns a configuration storage implementation.

Parameters

$class_loader: The class loader. Normally Composer's ClassLoader, as included by the front controller, but may also be decorated.

Return value

\Drupal\Core\Config\StorageInterface A configuration storage implementation.

3 calls to BootstrapConfigStorageFactory::get()
DrupalKernel::getConfigStorage in core/lib/Drupal/Core/DrupalKernel.php
Returns the active configuration storage to use during building the container.
LanguageServiceProvider::getDefaultLanguageValues in core/modules/language/src/LanguageServiceProvider.php
Gets the default language values.
LanguageServiceProvider::isMultilingual in core/modules/language/src/LanguageServiceProvider.php
Checks whether the site is multilingual.

File

core/lib/Drupal/Core/Config/BootstrapConfigStorageFactory.php, line 23

Class

BootstrapConfigStorageFactory
Defines a factory for retrieving the config storage used pre-kernel.

Namespace

Drupal\Core\Config

Code

public static function get($class_loader = NULL) {
    $bootstrap_config_storage = Settings::get('bootstrap_config_storage');
    $storage_backend = FALSE;
    if (!empty($bootstrap_config_storage) && is_callable($bootstrap_config_storage)) {
        $storage_backend = call_user_func($bootstrap_config_storage, $class_loader);
    }
    // Fallback to the DatabaseStorage.
    return $storage_backend ?: self::getDatabaseStorage();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.