You are here

public function InMemoryStorage::writeToCollection in Configuration Provider 8

Writes configuration data to the storage for a collection.

Parameters

string $name: The name of a configuration object to save.

array $data: The configuration data to write.

string $collection: The collection to store configuration in.

Return value

bool TRUE on success, FALSE in case of an error.

File

src/InMemoryStorage.php, line 193

Class

InMemoryStorage
Provides an in memory confituration storage.

Namespace

Drupal\config_provider

Code

public function writeToCollection($name, array $data, $collection) {
  if (!isset($this->config[$collection])) {
    $this->config[$collection] = [];
  }
  $this->config[$collection][$name] = $data;
  return TRUE;
}