protected function DatabaseStorage::doWrite
protected DatabaseStorage::doWrite($name, $data)
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
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 = array('return' => Database::RETURN_AFFECTED) + $this->options; return (bool) $this->connection->merge($this->table, $options) ->keys(array('collection', 'name'), array($this->collection, $name)) ->fields(array('data' => $data)) ->execute(); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Config!DatabaseStorage.php/function/DatabaseStorage::doWrite/8.1.x