You are here

public function YamlFormSubmission::getOriginalData in YAML Form 8

Gets the form submission's original data before any changes..

Parameters

string $key: A string that maps to a key in the submission's original data. If no key is specified, then the entire data array is returned.

Return value

array The form submission original data.

Overrides YamlFormSubmissionInterface::getOriginalData

File

src/Entity/YamlFormSubmission.php, line 352

Class

YamlFormSubmission
Defines the YamlFormSubmission entity.

Namespace

Drupal\yamlform\Entity

Code

public function getOriginalData($key = NULL) {
  if ($key !== NULL) {
    return isset($this->originalData[$key]) ? $this->originalData[$key] : NULL;
  }
  else {
    return $this->originalData;
  }
}