public function WebformRequest::getWebformSubmissionEntities in Webform 8.5
Same name and namespace in other branches
- 6.x src/WebformRequest.php \Drupal\webform\WebformRequest::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 WebformRequestInterface::getWebformSubmissionEntities
File
- src/
WebformRequest.php, line 210
Class
- WebformRequest
- Handles webform requests.
Namespace
Drupal\webformCode
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,
];
}