You are here

public function YamlFormSubmissionExporter::generate in YAML Form 8

Execute results exporter and write export to a temp file.

Overrides YamlFormSubmissionExporterInterface::generate

File

src/YamlFormSubmissionExporter.php, line 613

Class

YamlFormSubmissionExporter
Form submission exporter.

Namespace

Drupal\yamlform

Code

public function generate() {
  $entity_ids = $this
    ->getQuery()
    ->execute();
  $yamlform_submissions = YamlFormSubmission::loadMultiple($entity_ids);
  $this
    ->writeHeader();
  $this
    ->writeRecords($yamlform_submissions);
  $this
    ->writeFooter();
}