Create PrimaryEntityReferenceFieldItemList

Created on 18 May 2025, 4 days ago

Problem/Motivation

We want the primary to alway be delta 0. We want to be able to get the primary item.

Steps to reproduce

Proposed resolution

Create a custom FiledItemList: EntityReferenceFieldItemList

  /**
   * {@inheritdoc}
   */
  public function preSave() {
    usort($this->list, function ($a, $b) {
      return $b->primary <=> $a->primary;
    });

    parent::preSave();
  }

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States bluegeek9

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024