Search for setIfNotExists

  1. Search 7.x for setIfNotExists
  2. Search 8.9.x for setIfNotExists
  3. Search 10.3.x for setIfNotExists
  4. Search 11.x for setIfNotExists
  5. Other projects
Title Object type File name Summary
DatabaseStorage::doSetIfNotExists function core/lib/Drupal/Core/KeyValueStore/DatabaseStorage.php Saves a value for a given key if it does not exist yet.
DatabaseStorage::setIfNotExists function core/lib/Drupal/Core/KeyValueStore/DatabaseStorage.php Saves a value for a given key if it does not exist yet.
KeyValueStoreInterface::setIfNotExists function core/lib/Drupal/Core/KeyValueStore/KeyValueStoreInterface.php Saves a value for a given key if it does not exist yet.
MemoryStorage::setIfNotExists function core/lib/Drupal/Core/KeyValueStore/MemoryStorage.php Saves a value for a given key if it does not exist yet.
NullStorageExpirable::setIfNotExists function core/lib/Drupal/Core/KeyValueStore/NullStorageExpirable.php Saves a value for a given key if it does not exist yet.
SharedTempStore::setIfNotExists function core/lib/Drupal/Core/TempStore/SharedTempStore.php Stores a particular key/value pair only if the key doesn't already exist.
SharedTempStoreTest::testSetIfNotExists function core/tests/Drupal/Tests/Core/TempStore/SharedTempStoreTest.php Tests the setIfNotExists() methods.
StorageTestBase::testSetIfNotExists function core/tests/Drupal/KernelTests/Core/KeyValueStore/StorageTestBase.php Tests the setIfNotExists() method.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.