public function WebformRevisionsRequest::getWebformSubmissionEntities in Config Entity Revisions 8
Same name and namespace in other branches
- 8.2 modules/webform_revisions/src/WebformRevisionsRequest.php \Drupal\webform_revisions\WebformRevisionsRequest::getWebformSubmissionEntities()
- 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_revisionsCode
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,
];
}