You are here

public function TempStore::deleteAll in AJAX Comments 8

Delete the values from the privateTempStore.

Throws

\Drupal\user\TempStoreException

File

src/TempStore.php, line 161

Class

TempStore
A service to help store and retrieve data to be used across HTTP requests.

Namespace

Drupal\ajax_comments

Code

public function deleteAll() {
  $values = [
    'wrapper_html_id',
    'form_html_id',
    'form_machine_name',
    'cid',
  ];
  foreach ($values as $value) {
    $this->privateTempStore
      ->delete($value);
  }
}