You are here

public function InMemoryStorage::write in Configuration Provider 8

Writes configuration data to the storage.

Parameters

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

array $data: The configuration data to write.

Return value

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

Throws

\Drupal\Core\Config\StorageException If the back-end storage does not exist and cannot be created.

Overrides StorageInterface::write

File

src/InMemoryStorage.php, line 76

Class

InMemoryStorage
Provides an in memory confituration storage.

Namespace

Drupal\config_provider

Code

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