public function DatabaseStorageList::set in Key-value Extensions 8
Parameters
float $key:
mixed $value:
Overrides KeyValueStoreListInterface::set
File
- src/
KeyValueStore/ DatabaseStorageList.php, line 50
Class
Namespace
Drupal\key_value\KeyValueStoreCode
public function set($key, $value) {
$this->connection
->update($this->table)
->fields([
'value' => $this->serializer
->encode($value),
])
->condition('collection', $this->collection)
->condition('name', (int) $key)
->execute();
}