You are here

public function WebformSubmissionExporter::generate in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/WebformSubmissionExporter.php \Drupal\webform\WebformSubmissionExporter::generate()

Execute results exporter and write export to a temp file.

Overrides WebformSubmissionExporterInterface::generate

File

src/WebformSubmissionExporter.php, line 770

Class

WebformSubmissionExporter
Webform submission exporter.

Namespace

Drupal\webform

Code

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