You are here

protected function WebformSubmissionStorage::deleteData in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/WebformSubmissionStorage.php \Drupal\webform\WebformSubmissionStorage::deleteData()

Delete webform submission data from the 'webform_submission_data' table.

Parameters

array $webform_submissions: An array of webform submissions.

1 call to WebformSubmissionStorage::deleteData()
WebformSubmissionStorage::delete in src/WebformSubmissionStorage.php
Deletes permanently saved entities.

File

src/WebformSubmissionStorage.php, line 1437

Class

WebformSubmissionStorage
Defines the webform submission storage.

Namespace

Drupal\webform

Code

protected function deleteData(array $webform_submissions) {
  $sids = [];
  foreach ($webform_submissions as $webform_submission) {
    $sids[$webform_submission
      ->id()] = $webform_submission
      ->id();
  }
  $this->database
    ->delete('webform_submission_data')
    ->condition('sid', $sids, 'IN')
    ->execute();
}