You are here

protected function DeleteWebformSubmission::doExecute in RULES WEBFORM 8

Same name and namespace in other branches
  1. 3.x src/Plugin/RulesAction/DeleteWebformSubmission.php \Drupal\rules_webform\Plugin\RulesAction\DeleteWebformSubmission::doExecute()

Delete the submission of the selected webform.

Parameters

array $webform_info: Array with information about webform submission data.

File

src/Plugin/RulesAction/DeleteWebformSubmission.php, line 32

Class

DeleteWebformSubmission
Action for deletion of a webform submission.

Namespace

Drupal\rules_webform\Plugin\RulesAction

Code

protected function doExecute(array $webform_info) {
  $webform_info['submission']
    ->delete();
  \Drupal::state()
    ->delete('rules_webform.submission');
}