function DatabaseStorage::doWrite
Same name in other branches
- 9 core/lib/Drupal/Core/Config/DatabaseStorage.php \Drupal\Core\Config\DatabaseStorage::doWrite()
- 10 core/lib/Drupal/Core/Config/DatabaseStorage.php \Drupal\Core\Config\DatabaseStorage::doWrite()
- 11.x core/lib/Drupal/Core/Config/DatabaseStorage.php \Drupal\Core\Config\DatabaseStorage::doWrite()
Helper method so we can re-try a write.
Parameters
string $name: The config name.
string $data: The config data, already dumped to a string.
Return value
bool
1 call to DatabaseStorage::doWrite()
- DatabaseStorage::write in core/
lib/ Drupal/ Core/ Config/ DatabaseStorage.php - Writes configuration data to the storage.
File
-
core/
lib/ Drupal/ Core/ Config/ DatabaseStorage.php, line 145
Class
- DatabaseStorage
- Defines the Database storage.
Namespace
Drupal\Core\ConfigCode
protected function doWrite($name, $data) {
$options = [
'return' => Database::RETURN_AFFECTED,
] + $this->options;
return (bool) $this->connection
->merge($this->table, $options)
->keys([
'collection',
'name',
], [
$this->collection,
$name,
])
->fields([
'data' => $data,
])
->execute();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.