You are here

public function WebformRevisionsRequest::getCurrentWebformSubmission in Config Entity Revisions 8

Same name and namespace in other branches
  1. 8.2 modules/webform_revisions/src/WebformRevisionsRequest.php \Drupal\webform_revisions\WebformRevisionsRequest::getCurrentWebformSubmission()
  2. 1.x modules/webform_revisions/src/WebformRevisionsRequest.php \Drupal\webform_revisions\WebformRevisionsRequest::getCurrentWebformSubmission()

Get webform submission associated with the current request.

Return value

\Drupal\webform\WebformSubmissionInterface|null The current request's webform submission.

Overrides WebformRequest::getCurrentWebformSubmission

File

modules/webform_revisions/src/WebformRevisionsRequest.php, line 194

Class

WebformRevisionsRequest
Handles webform requests.

Namespace

Drupal\webform_revisions

Code

public function getCurrentWebformSubmission() {
  $webform_submission = $this->routeMatch
    ->getParameter('webform_submission');
  if (is_string($webform_submission)) {
    $webform_submission = $this->entityTypeManager
      ->getStorage('webform_submission')
      ->load($webform_submission);
  }
  return $webform_submission;
}