Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
render system
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
2 Aug 2015 at 09:31 UTC
Updated:
9 Nov 2015 at 10:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
lauriiiHammering this for a moment
Comment #2
jrearickUpdated issue summary to remember to update the parent issue when resolved and documenting what this issue is postponing.
Comment #3
xjmComment #4
wim leers+10
Comment #5
lauriiiSo when I've been looking at the child issues I've seen that this is used in a use cases where a render element has other render elements as children. Without using drupal_render_children they won't be rendered as render elements.
Comment #6
joelpittet#1847198: Update the structure returned by hook_toolbar() This introduced the toolbar's drupal_render_children(). And there was a bit of discussion but nothing resolved around why it's needed.
It's really tricky to remove early rendering because ToolbarItem is trying to pass it's properties upwards. (really the ToolbarItem should not be a render element and just be in toolbar, but that is D9 stuff)
Anyways here is a fix to remove the last drupal_render_children() call in core.
Comment #7
lauriiiComment #8
claudiu.cristeaNits.
The second line needs 2 spaces indentation.
Wrapping too early?
\Drupal::. Missed the leading backslash.Comment #9
star-szrUnfortunately I think removing that would be a regression for certain contrib modules that want to add things to the toolbar or toolbar tray. We need a way for render elements to be able to have things added to them and still be rendered in the Twig template.
Comment #10
joelpittetCottser ping me if you are confused. I'm just moving the render. Not removing. Toolbar is super weird in that it renders early so the pre-render adds extra stuff to the render array so toolbaritem can pass things up to the toolbar template.
Comment #11
star-szrCool I reviewed it on my phone so wasn't super thorough. As long as we're keeping that it sounds good :)
Comment #12
joelpittetThanks @Cottser, this one just needs to have the doc comment and nits fixed by @claudiu.cristea in #8
#2544176: Remove drupal_render_children() usage in Drupal\toolbar\Element\Toolbar has the usage removal. So we can remove the usage from toolbar in this issue.
Comment #13
joelpittetTouched up the docs as per #8 and removed the toolbar usage removal.
Hopefully the new text is clear. Please feel free to update if you have a more clear way of stating the alternative to this function.
Comment #14
lauriiiPostponing on #2544176: Remove drupal_render_children() usage in Drupal\toolbar\Element\Toolbar. Docs looks good for me.
Comment #15
xjmSince this only changes docs once #2544176: Remove drupal_render_children() usage in Drupal\toolbar\Element\Toolbar goes in, it can be "rc eligible" rather than an rc target. Reference: https://www.drupal.org/core/d8-allowed-changes#rc
Comment #16
lauriiiBack to NR since this is not blocked anymore
Comment #18
lauriiiComment #20
catchCommitted/pushed to 8.0.x, thanks!
Comment #22
wim leersJust this:
<3
Comment #23
wim leersRender system sanity.