Update field output to always be an array to allow for multivalue fields

Created on 31 January 2018, almost 7 years ago
Updated 1 March 2023, almost 2 years ago

Problem/Motivation

8.x-1.0 Task

Update field output to always be an array to allow for multivalue fields, using $field_item->getValue() as output (entity reference and metatag fields remaining exceptions)

Proposed resolution

See above

Remaining tasks

See above

User interface changes

N/A

API changes

Field output will always be an array for the value property.

"field_text": {
  _attributes: [],
  value: "feafewa"
}

# becomes

"field_text": {
  _attributes: [],
  value: ["feafewa"]
}

Data model changes

N/A

πŸ“Œ Task
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States bighappyface

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States mihaic

    Hello

    This is a rework of patch #12 for the version 2.0.0-rc1 of the module.

    Hope this will help some people until the code and improvements proposed above will be merged into the latest release.

    Thanks

Production build 0.71.5 2024