public function ConfigSnapshotStorage::write in Config Snapshot 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
1 call to ConfigSnapshotStorage::write()
- ConfigSnapshotStorage::rename in src/
ConfigSnapshotStorage.php - Renames a configuration object in the storage.
File
- src/
ConfigSnapshotStorage.php, line 132
Class
- ConfigSnapshotStorage
- Provides a configuration storage saved as simple configuration.
Namespace
Drupal\config_snapshotCode
public function write($name, array $data) {
$this->configSnapshot
->setItem($this->collection, $name, $data)
->save();
return TRUE;
}