function StorageBase::setMultiple
Same name in other branches
- 9 core/lib/Drupal/Core/KeyValueStore/StorageBase.php \Drupal\Core\KeyValueStore\StorageBase::setMultiple()
- 8.9.x core/lib/Drupal/Core/KeyValueStore/StorageBase.php \Drupal\Core\KeyValueStore\StorageBase::setMultiple()
- 11.x core/lib/Drupal/Core/KeyValueStore/StorageBase.php \Drupal\Core\KeyValueStore\StorageBase::setMultiple()
Overrides KeyValueStoreInterface::setMultiple
1 method overrides StorageBase::setMultiple()
- MemoryStorage::setMultiple in core/
lib/ Drupal/ Core/ KeyValueStore/ MemoryStorage.php - Saves key/value pairs.
File
-
core/
lib/ Drupal/ Core/ KeyValueStore/ StorageBase.php, line 42
Class
- StorageBase
- Provides a base class for key/value storage implementations.
Namespace
Drupal\Core\KeyValueStoreCode
public function setMultiple(array $data) {
foreach ($data as $key => $value) {
$this->set($key, $value);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.