Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Updated: Comment #0
Problem/Motivation
Follow-up from #2112807-32: Move the form builder functions in form.inc to a form service. 18. (see also comment #33)
form_options_flatten() also needs to be a method, it slipped through the cracks of the conversion.
Proposed resolution
Convert form_options_flatten() to FormBuilder::flattenOptions()
Remaining tasks
N/A
User interface changes
N/A
API changes
API addition, wrapper is left in place
Related Issues
Comment | File | Size | Author |
---|---|---|---|
#6 | form-2120841-6.patch | 7.28 KB | tim.plunkett |
#6 | interdiff.txt | 562 bytes | tim.plunkett |
#4 | form-2120841-4.patch | 7.28 KB | tim.plunkett |
#4 | interdiff.txt | 2.93 KB | tim.plunkett |
#1 | form-2120841-1.patch | 7.69 KB | tim.plunkett |
Comments
Comment #1
tim.plunkettComment #2
tim.plunkett.
Comment #3
dawehnerShould we also document the @param @return here?
Comment #4
tim.plunkettWhile trying to document doFlattenOptions(), I realized its return signature was inconsistent, so I cleaned that up.
Also rewrapped some docs to 80 chars.
Comment #5
dawehnerWell ... we don't really return anything.
Comment #6
tim.plunkettAhh very good point.
Comment #7
dawehnerThank you!
Comment #8
damiankloip CreditAttribution: damiankloip commentedJust putting it out there, instead of essentially storing state on the form builder server, could we pass the flattened options as a second parameter? this could be passed recursively etc... no problem.
Let me know if I'm talking shit.
Comment #8.0
damiankloip CreditAttribution: damiankloip commentedlisted which number followup this was
Comment #9
tim.plunkett6: form-2120841-6.patch queued for re-testing.
Comment #10
Xano6: form-2120841-6.patch queued for re-testing.
Comment #11
smiletrl CreditAttribution: smiletrl commented#2138803: Overhaul field items' flattenOption is postponed on this issue.
Comment #12
webchickCommitted and pushed to 8.x. Thanks!