Methods that work on a specific $delta in a list of $items (FieldItemList) should receive that $item (FieldItem) directly instead of $items + $delta
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 2175343-1.patch | 36.61 KB | swentel |
Methods that work on a specific $delta in a list of $items (FieldItemList) should receive that $item (FieldItem) directly instead of $items + $delta
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 2175343-1.patch | 36.61 KB | swentel |
Comments
Comment #1
swentel commentedComment #3
yched commented[edited out: that was meant for the OP]
Comment #4
yched commentedComment #5
andypostHow this change will affect a widgets that manage multiple values internally, for example autocomplete?
Comment #6
yched commentedHm - yeah.
In the end, "widgets than manage multiple items" and "widgets that manage one single item and need to be repeated" would be better off using separate methods, instead of both going through the half-assed Widget::formElements($items, $delta).
That was the goal of #1846162: Cleanup Widgets API : add a separate base class for 'multiple' widgets, but it never went through.
Comment #7
plopescPostponing on #1846162: Cleanup Widgets API : add a separate base class for 'multiple' widgets
Comment #21
smustgrave commentedThank you for creating this issue to improve Drupal.
We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
Comment #22
smustgrave commentedSince there's been no follow up going to close out, but if still valid in D11 we can always re-open.
Thanks all!