public function WebformSubmissionExportImportWebformExporter::writeSubmission in Webform 6.x
Same name and namespace in other branches
- 8.5 modules/webform_submission_export_import/src/Plugin/WebformExporter/WebformSubmissionExportImportWebformExporter.php \Drupal\webform_submission_export_import\Plugin\WebformExporter\WebformSubmissionExportImportWebformExporter::writeSubmission()
Write submission to export.
Parameters
\Drupal\webform\WebformSubmissionInterface $webform_submission: A webform submission.
Overrides WebformExporterBase::writeSubmission
File
- modules/
webform_submission_export_import/ src/ Plugin/ WebformExporter/ WebformSubmissionExportImportWebformExporter.php, line 90
Class
- WebformSubmissionExportImportWebformExporter
- Defines a machine readable CSV export that can be imported back into the current webform.
Namespace
Drupal\webform_submission_export_import\Plugin\WebformExporterCode
public function writeSubmission(WebformSubmissionInterface $webform_submission) {
$record = $this
->getImporter()
->exportSubmission($webform_submission, $this->configuration);
fputcsv($this->fileHandle, $record);
}