You are here

protected function PanelsStorageManager::getStorage in Panels 8.4

Same name and namespace in other branches
  1. 8.3 src/Storage/PanelsStorageManager.php \Drupal\panels\Storage\PanelsStorageManager::getStorage()

Gets a storage plugin.

Parameters

string $storage_type: The storage type used by the storage plugin.

Return value

\Drupal\panels\Storage\PanelsStorageInterface The Panels storage plugin with the given storage type.

Throws

\Drupal\Component\Plugin\Exception\PluginException If there is no Panels storage plugin with the given storage type.

2 calls to PanelsStorageManager::getStorage()
PanelsStorageManager::load in src/Storage/PanelsStorageManager.php
Loads a Panels display.
PanelsStorageManager::save in src/Storage/PanelsStorageManager.php
Saves a Panels display.

File

src/Storage/PanelsStorageManager.php, line 79

Class

PanelsStorageManager
Panels storage manager service.

Namespace

Drupal\panels\Storage

Code

protected function getStorage($storage_type) {
  if (!isset($this->storage[$storage_type])) {
    $this->storage[$storage_type] = $this
      ->createInstance($storage_type);
  }
  return $this->storage[$storage_type];
}