You are here

public function TestWebformHandler::preSave in Webform Encrypt 8

Acts on a webform submission before the presave hook is invoked.

Parameters

\Drupal\webform\WebformSubmissionInterface $webform_submission: A webform submission.

Overrides WebformHandlerBase::preSave

File

tests/modules/webform_encrypt_test/src/Plugin/WebformHandler/TestWebformHandler.php, line 65

Class

TestWebformHandler
Webform submission action handler.

Namespace

Drupal\webform_encrypt_test\Plugin\WebformHandler

Code

public function preSave(WebformSubmissionInterface $webform_submission) {
  $counter = $this->state
    ->get('test_webform_handler_presave_counter', 0);
  $this->state
    ->set('test_webform_handler_presave_counter', ++$counter);
}