StorageBase::setMultiple

public StorageBase::setMultiple(array $data)

Saves key/value pairs.

Parameters

array $data: An associative array of key/value pairs.

Overrides KeyValueStoreInterface::setMultiple

File

core/lib/Drupal/Core/KeyValueStore/StorageBase.php, line 42

Class

StorageBase
Provides a base class for key/value storage implementations.

Namespace

Drupal\Core\KeyValueStore

Code

public function setMultiple(array $data) {
  foreach ($data as $key => $value) {
    $this->set($key, $value);
  }
}
doc_Drupal
2016-10-29 09:44:34
Comments
Leave a Comment

Please login to continue.