public function SessionBasedTempStore::deleteAll in Session Based Temporary Storage 8
Deletes all data from the store for the current collection and owner.
Throws
\Drupal\Core\TempStore\TempStoreException
File
- src/
SessionBasedTempStore.php, line 259
Class
- SessionBasedTempStore
- Stores and retrieves temporary data for a given owner.
Namespace
Drupal\session_based_temp_storeCode
public function deleteAll() {
$keys = [];
foreach ($this
->getAll() as $key => $value) {
$keys[] = $this
->createkey($key);
}
$this->storage
->deleteMultiple($keys);
}