You are here

public function FeaturesExtensionStorages::addStorage in Features 8.4

Same name and namespace in other branches
  1. 8.3 src/FeaturesExtensionStorages.php \Drupal\features\FeaturesExtensionStorages::addStorage()

Adds a storage.

Parameters

string $directory: (optional) The configuration directory. If omitted, InstallStorage::CONFIG_INSTALL_DIRECTORY will be used.

Overrides FeaturesExtensionStoragesInterface::addStorage

File

src/FeaturesExtensionStorages.php, line 55

Class

FeaturesExtensionStorages
Wraps FeaturesInstallStorage to support multiple configuration directories.

Namespace

Drupal\features

Code

public function addStorage($directory = InstallStorage::CONFIG_INSTALL_DIRECTORY) {
  $this->extensionStorages[$directory] = new FeaturesInstallStorage($this->configStorage, $directory);
  $this
    ->reset();
}