Support for Entity Browser Widget

Created on 25 May 2022, over 2 years ago
Updated 24 April 2023, over 1 year ago

Problem/Motivation

I would like to see Field Config Cardinality support EntityReferenceBrowserWidget as well. It would require some refactoring of the Entity Browser widget too (if we do not want to repeat a lot of code). I brought this to Entity Browser as feature request: Entity Browser Entity Reference Widget: wrap getCardinality() in own function Needs review .

Steps to reproduce

Use entity browser widget together with Field Config Cardinality. Entity browser widget does not respect Field Config Cardinality settings.

Proposed resolution

Extend EntityReferenceBrowserWidget similar how it was done for MediaLibraryWidget in #3117908: Cardinality for MediaLibraryWidget

Remaining tasks

User interface changes

Entity Browser widget will respect Field Config Cardinality setting (e. g. messages for remaining and total allowed elements, radio vs checkbox etc.)

API changes

na

Data model changes

na

Feature request
Status

Needs review

Version

3.0

Component

Code

Created by

🇩🇪Germany stefan.korn Jossgrund

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.

  • 🇩🇪Germany stefan.korn Jossgrund

    None of the patches do apply against latest dev anymore.

    @0livier: Thanks for the improvement suggestions, they make sense.

    Not sure at this moment why I had this rather difficult return statement, but I think there was some edge cases to consider. So I did not use your simplified statement here. Feel free to change or explain.

    Providing patch based on #4 with suggestions from #5 that applies to latest dev, hopefully.

Production build 0.71.5 2024