public function ConfigSnapshotStorage::writeToCollection in Config Snapshot 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/
ConfigSnapshotStorage.php, line 281
Class
- ConfigSnapshotStorage
- Provides a configuration storage saved as simple configuration.
Namespace
Drupal\config_snapshotCode
public function writeToCollection($name, array $data, $collection) {
$this->configSnapshot
->setItem($collection, $name, $data)
->save();
return TRUE;
}