You are here

public function WebformRevisionsRequest::getWebformSubmissionEntities 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::getWebformSubmissionEntities()
  2. 1.x modules/webform_revisions/src/WebformRevisionsRequest.php \Drupal\webform_revisions\WebformRevisionsRequest::getWebformSubmissionEntities()

Get the webform submission and source entity for the current request.

Return value

array An array containing the webform and source entity for the current request.

Overrides WebformRequest::getWebformSubmissionEntities

File

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

Class

WebformRevisionsRequest
Handles webform requests.

Namespace

Drupal\webform_revisions

Code

public function getWebformSubmissionEntities() {
  $webform_submission = $this->routeMatch
    ->getParameter('webform_submission');
  if (is_string($webform_submission)) {
    $webform_submission = $this->entityTypeManager
      ->getStorage('webform_submission')
      ->load($webform_submission);
  }
  $source_entity = $this
    ->getCurrentSourceEntity('webform_submission');
  return [
    $webform_submission,
    $source_entity,
  ];
}