You are here

public function WebformSubmissionExporter::writeHeader in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/WebformSubmissionExporter.php \Drupal\webform\WebformSubmissionExporter::writeHeader()

Write webform results header to export file.

Overrides WebformSubmissionExporterInterface::writeHeader

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

File

src/WebformSubmissionExporter.php, line 798

Class

WebformSubmissionExporter
Webform submission exporter.

Namespace

Drupal\webform

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();
}