You are here

protected function ManagedStorage::getStorage in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Config/ManagedStorage.php \Drupal\Core\Config\ManagedStorage::getStorage()

Get the decorated storage from the manager if necessary.

Return value

\Drupal\Core\Config\StorageInterface The config storage.

File

core/lib/Drupal/Core/Config/ManagedStorage.php, line 143

Class

ManagedStorage
The managed storage defers all the storage method calls to the manager.

Namespace

Drupal\Core\Config

Code

protected function getStorage() {

  // Get the storage from the manager the first time it is needed.
  if (!isset($this->storage)) {
    $this->storage = $this->manager
      ->getStorage();
  }
  return $this->storage;
}