Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Task
Use Twig instead of PHPTemplate
Twig sandbox: http://drupal.org/sandbox/pixelmord/1750250
We already have datetime.html.twig but we still need to remove theme_datetime() and likely do a few tweaks to template_preprocess_datetime() and datetime.html.twig while we're at it.
Remaining
- Replace all theme functions and templates with .html.twig equivalent templates
- Add new preprocess functions for the .html.twig equivalent templates
- Update all hook_theme definitions
Related
Comment | File | Size | Author |
---|---|---|---|
#5 | twig-datetime-1939080-5.patch | 2.99 KB | joelpittet |
#5 | interdiff.txt | 662 bytes | joelpittet |
#3 | twig-datetime-1939080-3.patch | 2.75 KB | joelpittet |
Comments
Comment #1
tlattimore CreditAttribution: tlattimore commentedI'll take this.
Comment #2
tlattimore CreditAttribution: tlattimore commentedComment #3
joelpittetThis one was technically already done and in core... I just cleaned the twig file up and removed the theme_ function.
Comment #4
tlattimore CreditAttribution: tlattimore commentedThanks for working on this, joelpittet. Sorry I didn't get to it :(
This patch looks good for RTBC for me if it passes. Some good cleanup of the .twig and removing the theme function.
Comment #5
joelpittetAdded @steveoliver's doc change from #1898480: [meta] form.inc - Convert theme_ functions to Twig
Comment #6
star-szrLooks good, just cleanup and theme() function removal. Nice work, RTBC!
Comment #7
alexpottWe should profile this change
Comment #8
joelpittetComment #9
joelpittetScenario: Added datetime field to article and loaded them into a fields view showing 10 articles titles and datetime fields
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=51a287779d22e&...
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=51a287779d22e&...
Comment #10
joelpittetBack to RTBC, profiling looks good.
Comment #11
star-szr+1 to going back to RTBC, less function calls.
Comment #12
alexpottHooray for less function calls...
Committed 9236b3f and pushed to 8.x. Thanks!