You are here

public function WebformRequest::getWebformEntities in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/WebformRequest.php \Drupal\webform\WebformRequest::getWebformEntities()

Get the webform and source entity for the current request.

Return value

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

Overrides WebformRequestInterface::getWebformEntities

File

src/WebformRequest.php, line 197

Class

WebformRequest
Handles webform requests.

Namespace

Drupal\webform

Code

public function getWebformEntities() {
  $webform = $this
    ->getCurrentWebform();
  $source_entity = $this
    ->getCurrentSourceEntity('webform');
  return [
    $webform,
    $source_entity,
  ];
}