You are here

protected function YamlFormSubmissionForm::draftEnabled in YAML Form 8

Determine if drafts are enabled.

Return value

bool TRUE if drafts are enabled.

4 calls to YamlFormSubmissionForm::draftEnabled()
YamlFormSubmissionForm::actions in src/YamlFormSubmissionForm.php
Returns an array of supported actions for the current entity form.
YamlFormSubmissionForm::autosave in src/YamlFormSubmissionForm.php
Form submission handler to autosave when there are validation errors.
YamlFormSubmissionForm::getCurrentPage in src/YamlFormSubmissionForm.php
Get the current page's key.
YamlFormSubmissionForm::wizardSubmit in src/YamlFormSubmissionForm.php
Form submission handler for the wizard submit action.

File

src/YamlFormSubmissionForm.php, line 1347

Class

YamlFormSubmissionForm
Provides a form to collect and edit submissions.

Namespace

Drupal\yamlform

Code

protected function draftEnabled() {
  $account = $this
    ->currentUser();
  return $account
    ->isAuthenticated() && $this
    ->getYamlFormSetting('draft') && !$this
    ->getYamlFormSetting('results_disabled') ? TRUE : FALSE;
}