Problem/Motivation

Per #3610122: Field data for multiple cardinality fields are not populated on entity load

loadMultipleCardinalityFields() does too much and takes way too many arguments for my liking, maybe we can refactor this elsewhere.

The original method had some of the highest cyclomatic complexity of any method in core until we split it up, but the split up version is not really much better either.

Adding the needs followup tag since still need an issue for refactoring ::loadMultipleCardinalityFields() but I think the single cardinality method is as bad or worse, and we might want to tackle them together

This issue to tackle both for now, but can be split if it works out better that way.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Comments

godotislate created an issue. See original summary.

godotislate’s picture

Title: Refactor complexity in loadSingleCardinalityFields() and loadMultipleCardinalityFields() » Refactor to reduce complexity in loadSingleCardinalityFields() and loadMultipleCardinalityFields()