You are here

public function RemotePostWebformHandler::postSave in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Plugin/WebformHandler/RemotePostWebformHandler.php \Drupal\webform\Plugin\WebformHandler\RemotePostWebformHandler::postSave()

Acts on a saved webform submission before the insert or update hook is invoked.

Parameters

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

bool $update: TRUE if the entity has been updated, or FALSE if it has been inserted.

Overrides WebformHandlerBase::postSave

File

src/Plugin/WebformHandler/RemotePostWebformHandler.php, line 463

Class

RemotePostWebformHandler
Webform submission remote post handler.

Namespace

Drupal\webform\Plugin\WebformHandler

Code

public function postSave(WebformSubmissionInterface $webform_submission, $update = TRUE) {
  $state = $webform_submission
    ->getWebform()
    ->getSetting('results_disabled') ? WebformSubmissionInterface::STATE_COMPLETED : $webform_submission
    ->getState();
  $this
    ->remotePost($state, $webform_submission);
}