Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
As YAML Form elements get more complex, developers may need to export the raw submission data as JSON, YAML, or XML.
Proposed resolution
Provide a document exporter which creates JSON, YAML, and XML documents for submissions in a zipped archive.
Notes
- Document file names will use token
- Each document will contain the serializes YamlFormSubmission::toArray(TRUE) output.
- Not sure what meta data needa to be added the export.
Remaining tasks
- Add entityStorage to YamlFormExporter plugin as dependancy
- Add columns=TRUE to YamlFormExport annotation
- Convert FileHandleBaseYamlFormExporter to FileHandleYamlFormExporterTrait
- Create TabularBaseYamlFormExporter
- Move getFieldDefinitions() ADD CACHING
- Move getElements() ADD CACHING
- Move buildHeader
- Move buildRecord
- Create DocumentBaseYamlFormExporter
- Hide most options for data export if columns = FALSE.
User interface changes
Export form is going to change.
API changes
YamlFormExporterInterface is going to change.
Development Notes
- Branch Name: 2821781-provide-document-exporter
- Commit message: Issue #2821781: Provide a document exporter
Comment | File | Size | Author |
---|---|---|---|
#5 | provide_a_document-2821781-5.patch | 62.37 KB | jrockowitz |
Comments
Comment #2
jrockowitz CreditAttribution: jrockowitz commentedComment #5
jrockowitz CreditAttribution: jrockowitz commentedComment #7
jrockowitz CreditAttribution: jrockowitz commented