Problem/Motivation

The CSV encoder settings can be changed globally with the class the default parameters or by a views plugin but there is no way to override those settings when the serializer/encoder is called manually.

Proposed resolution

The CSV encoder could accept settings as a contextual option.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Aerzas created an issue. See original summary.

aerzas’s picture

aerzas’s picture

Status: Active » Needs review
aerzas’s picture

StatusFileSize
new2.03 KB

Re-rolling against 2.0.

aerzas’s picture

Issue tags: +Needs review
StatusFileSize
new2.06 KB

Make parameters optional and re-use current value.

acbramley made their first commit to this issue’s fork.

acbramley’s picture

Issue tags: -Needs review

We have a use case for this as well.

We have a custom batch process seriazling data and writing it to a temp file. We have to manually parse out the header row for anything past the first batch as there's no way currently to disable the header output.

The null coalescing means we can just pass in something like ['output_header' => FALSE] instead of duplicating every setting, nice one :)

Created an MR with #5 rerolled against latest dev.

acbramley’s picture

Version: 8.x-2.x-dev » 3.x-dev

Ah, didn't realise there was a 3.x branch. I'll reroll against that.

markdorison’s picture

Version: 3.x-dev » 4.x-dev
aerzas’s picture

Adding re-rolled patches against the new 3.x and 4.x versions

markdorison’s picture

Status: Needs review » Fixed
markdorison’s picture

//www.flaticon.com/free-icons/thank-you Thank you for your contribution! Your continued support to this project makes other volunteer contributions more sustainable.
There are multiple ways to show appreciation for the work contributed to this project including:
  • Triaging issues and adding more context to existing issues.
  • Writing documentation or patches for this project.
  • Writing blog posts or speaking about it at conferences.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.