You are here

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_store

Code

public function deleteAll() {
  $keys = [];
  foreach ($this
    ->getAll() as $key => $value) {
    $keys[] = $this
      ->createkey($key);
  }
  $this->storage
    ->deleteMultiple($keys);
}