You are here

public function TestPurgeHandler::postPurge in Webform 6.x

Same name and namespace in other branches
  1. 8.5 tests/modules/webform_test_handler/src/Plugin/WebformHandler/TestPurgeHandler.php \Drupal\webform_test_handler\Plugin\WebformHandler\TestPurgeHandler::postPurge()

Acts on webform submissions after they are purged.

Used after the entities are purged and after they are deleted..

Parameters

\Drupal\webform\WebformSubmissionInterface[] $webform_submissions: The webform submissions that were purged.

Overrides WebformHandlerBase::postPurge

File

tests/modules/webform_test_handler/src/Plugin/WebformHandler/TestPurgeHandler.php, line 33

Class

TestPurgeHandler
Defines a handler that interacts with the submission purge APIs.

Namespace

Drupal\webform_test_handler\Plugin\WebformHandler

Code

public function postPurge(array $webform_submissions) {
  \Drupal::state()
    ->set('webform_test_purge_handler_post', array_map(function (WebformSubmissionInterface $submission) {
    return $submission
      ->id();
  }, $webform_submissions));
  parent::postPurge($webform_submissions);
}