public function YamlFormSignature::buildExportRecord in YAML Form 8
Build an element's export row.
Parameters
array $element: An element.
array $export_options: An associative array of export options.
Return value
array An array containing the element's export row.
Overrides YamlFormElementBase::buildExportRecord
See also
\Drupal\yamlform\YamlFormSubmissionExporterInterface::getDefaultExportOptions
File
- src/
Plugin/ YamlFormElement/ YamlFormSignature.php, line 143
Class
- YamlFormSignature
- Provides a 'signature' element.
Namespace
Drupal\yamlform\Plugin\YamlFormElementCode
public function buildExportRecord(array $element, $value, array $export_options) {
$element['#format'] = $export_options['signature_format'] == 'status' ? 'image' : 'raw';
return [
$this
->formatText($element, $value, $export_options),
];
}