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? |
---|---|---|---|
aggregator | theme_aggregator_categorize_items | function | form table |
Related issues
Comment | File | Size | Author |
---|---|---|---|
#8 | aggregator-type-table-1938894-7.patch | 4.58 KB | jibran |
#8 | interdiff.txt | 831 bytes | jibran |
#7 | aggregator-type-table-1938894-6.patch | 4.58 KB | jibran |
#7 | interdiff.txt | 2.59 KB | jibran |
#3 | aggregator-type-table-1938894-3.patch | 4.66 KB | joelpittet |
Comments
Comment #1
joelpittetAdded a @todo about the classes
I have a feeling that if we used #rows instead of child elements(like normal #theme=>table expects, we could do this cell attributes but it will skip "drupal_pre_render_table", it may also not work with the form api but that's just a guess...
Comment #2
ParisLiakos CreditAttribution: ParisLiakos commentedI dont understand why we need $categories variable here and unset()?
I think this class is not used anywhere so you can easily just kill it here.
Comment #3
joelpittetCell class killed. Refactored the loops a bit and removed the unset()/$categories shuffling.
Also, not sure if this is a bug or intended functionality but when you unselect two categories, it rechecks the "automatically checked category" (which is fair enough but it would make sense on the create state to do this and if manual changes are made they are respected over the automatic). And weirder yet, if you uncheck the "auto" category and check the "non-auto" and hit save, it decides that you are wrong and checks only the "auto" category. If that doesn't sound right to other people I will open another issue for that.
Comment #4
joelpittetOn second look, I may have broken something along the way... this may need some tests for the above functionality.
Comment #5
joelpittetWell I did further testing and now it seems to be working as expected, so weird, may still need tests though. Thoughts?
Comment #6
ParisLiakos CreditAttribution: ParisLiakos commentedThere are already tests for this one..it is just that an item inherits category from its feed
This seems a lot better..
Just one thing
lets make this one line: if ($items && $form_items = entity_view_multiple($items, 'default'))
Comment #7
jibranMade the changes as per #6 removing tag as per above comment.
Comment #8
jibranMinor indentation fix. Added Novice tag as per meta.
Comment #9
ParisLiakos CreditAttribution: ParisLiakos commentedSeems good to me and testbot agrees
Comment #10
catchLooks great. Committed/pushed to 8.x.
Comment #11.0
(not verified) CreditAttribution: commentedUpdated issue summary.
Comment #12
joelpittet