You are here

public function WebformSubmission::isDraft in Webform 6.x

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

Is the current submission in draft.

Return value

bool TRUE if the current submission is a draft.

Overrides WebformSubmissionInterface::isDraft

2 calls to WebformSubmission::isDraft()
WebformSubmission::getState in src/Entity/WebformSubmission.php
Track the state of a submission.
WebformSubmission::preSave in src/Entity/WebformSubmission.php
Acts on an entity before the presave hook is invoked.

File

src/Entity/WebformSubmission.php, line 644

Class

WebformSubmission
Defines the WebformSubmission entity.

Namespace

Drupal\webform\Entity

Code

public function isDraft() {
  return $this
    ->get('in_draft')->value ? TRUE : FALSE;
}