You are here

public function WebformSubmission::getWebform in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Entity/WebformSubmission.php \Drupal\webform\Entity\WebformSubmission::getWebform()

Gets the webform submission's webform entity.

Return value

\Drupal\webform\WebformInterface The webform entity.

Overrides WebformSubmissionInterface::getWebform

5 calls to WebformSubmission::getWebform()
WebformSubmission::getData in src/Entity/WebformSubmission.php
Gets the webform submission's data with computed valued.
WebformSubmission::invokeWebformElements in src/Entity/WebformSubmission.php
Invoke a webform element elements method.
WebformSubmission::invokeWebformHandlers in src/Entity/WebformSubmission.php
Invoke all webform handlers method.
WebformSubmission::toArray in src/Entity/WebformSubmission.php
Gets an array of all property values.
WebformSubmission::urlRouteParameters in src/Entity/WebformSubmission.php
Gets an array of placeholders for this entity.

File

src/Entity/WebformSubmission.php, line 511

Class

WebformSubmission
Defines the WebformSubmission entity.

Namespace

Drupal\webform\Entity

Code

public function getWebform() {
  if (isset($this->webform_id->entity)) {
    return $this->webform_id->entity;
  }
  else {
    return static::$webform;
  }
}