protected function DelimitedWebformExporter::buildRecord in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Plugin/WebformExporter/DelimitedWebformExporter.php \Drupal\webform\Plugin\WebformExporter\DelimitedWebformExporter::buildRecord()
Build export record using a webform submission.
Parameters
\Drupal\webform\WebformSubmissionInterface $webform_submission: A webform submission.
Return value
array An array containing the export record.
Overrides TabularBaseWebformExporter::buildRecord
1 call to DelimitedWebformExporter::buildRecord()
- DelimitedWebformExporter::writeSubmission in src/
Plugin/ WebformExporter/ DelimitedWebformExporter.php - Write submission to export.
File
- src/
Plugin/ WebformExporter/ DelimitedWebformExporter.php, line 109
Class
- DelimitedWebformExporter
- Defines a delimited text exporter.
Namespace
Drupal\webform\Plugin\WebformExporterCode
protected function buildRecord(WebformSubmissionInterface $webform_submission) {
$record = parent::buildRecord($webform_submission);
if ($this->configuration['excel']) {
foreach ($record as $index => $value) {
if (is_string($value)) {
$record[$index] = str_replace(PHP_EOL, "\r\n", $value);
}
}
}
return $record;
}