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.
Task
Convert the following theme functions to use the new table #type:
Module | Theme function name | Where in Code | What is it really? |
---|---|---|---|
filter | theme_filter_admin_format_filter_order | function | form table draggable |
|
|
|
|
theme_filter_admin_overview() was already converted as part of #80855: Add element #type table and merge tableselect/tabledrag into it.
Related issues
Comment | File | Size | Author |
---|---|---|---|
#7 | before.png | 4.74 KB | jibran |
#7 | after.png | 4.75 KB | jibran |
#6 | filter-type-table-1938904-5.patch | 3.58 KB | joelpittet |
#6 | interdiff.txt | 790 bytes | joelpittet |
#5 | 1938904-5-filter-table.patch | 3.63 KB | duellj |
Comments
Comment #1
joelpittetSomeone already did theme_filter_admin_overview as it was committed. Here is the other one.
Comment #3
joelpittetHmm not sure what I am doing wrong but this fixed a few things. Seems my table's row weights aren't loading in the right order. After many different ways of doing the same thing I am giving up. Any pointers would be great.
Comment #5
duellj CreditAttribution: duellj commentedFixed failing tests from #3. Filters weren't being sorted after the theme function was removed, since element_children() was never called. Also, filter_admin_format_form_submit() was expecting filters values to be an array, so a #tree needed to be added.
Comment #6
joelpittetThanks a bunch @duellj !!! That was totally the ticket and I learned something. That #tree bit didn't seem to have any affect so this little patch just removes it. The tree comes down from the parent so that should be fine.
Comment #7
jibranCode looks good. conversion is fine. RTBC for me.
Before
After
Comment #8
catchCommitted/pushed to 8.x, thanks!
Comment #9.0
(not verified) CreditAttribution: commentedUpdate summary to indicate theme_filter_admin_overview was already converted.