You are here

public function YamlFormSubmissionExporter::writeHeader in YAML Form 8

Write form results header to export file.

Overrides YamlFormSubmissionExporterInterface::writeHeader

1 call to YamlFormSubmissionExporter::writeHeader()
YamlFormSubmissionExporter::generate in src/YamlFormSubmissionExporter.php
Execute results exporter and write export to a temp file.

File

src/YamlFormSubmissionExporter.php, line 625

Class

YamlFormSubmissionExporter
Form submission exporter.

Namespace

Drupal\yamlform

Code

public function writeHeader() {

  // If building a new archive make sure to delete the exist archive.
  if ($this
    ->isArchive()) {
    @unlink($this
      ->getArchiveFilePath());
  }
  $this
    ->getExporter()
    ->createExport();
  $this
    ->getExporter()
    ->writeHeader();
  $this
    ->getExporter()
    ->closeExport();
}