function DrupalKernel::getConfigStorage

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/DrupalKernel.php \Drupal\Core\DrupalKernel::getConfigStorage()
  2. 10 core/lib/Drupal/Core/DrupalKernel.php \Drupal\Core\DrupalKernel::getConfigStorage()
  3. 11.x core/lib/Drupal/Core/DrupalKernel.php \Drupal\Core\DrupalKernel::getConfigStorage()

Returns the active configuration storage to use during building the container.

Return value

\Drupal\Core\Config\StorageInterface

1 call to DrupalKernel::getConfigStorage()
InstallerKernel::getConfigStorage in core/lib/Drupal/Core/Installer/InstallerKernel.php
Returns the active configuration storage used during early install.
1 method overrides DrupalKernel::getConfigStorage()
InstallerKernel::getConfigStorage in core/lib/Drupal/Core/Installer/InstallerKernel.php
Returns the active configuration storage used during early install.

File

core/lib/Drupal/Core/DrupalKernel.php, line 1425

Class

DrupalKernel
The DrupalKernel class is the core of Drupal itself.

Namespace

Drupal\Core

Code

protected function getConfigStorage() {
    if (!isset($this->configStorage)) {
        // The active configuration storage may not exist yet; e.g., in the early
        // installer so if an exception is thrown use a NullStorage.
        try {
            $this->configStorage = BootstrapConfigStorageFactory::get($this->classLoader);
        } catch (\Exception $e) {
            $this->configStorage = new NullStorage();
        }
    }
    return $this->configStorage;
}

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