- Issue created by @pdureau
- Status changed to Closed: duplicate
4 months ago 11:10am 18 September 2024 - 🇫🇷France mogtofu33
Fixed in 📌 [Meta Beta release] Clean code, no default template, better preview Fixed
On beta1, we have IconDefinition::getRenderable() whcih is building:
[
'#type' => 'inline_template',
'#template' => $template,
'#context' => $context + $options,
];
Most of integration plugins (and the render element itself !) are calling this public method.
Only ui_icons_patterns IconRenderableSource is calling the render element:
[
'#type' => 'ui_icon',
'#icon_pack' => $icon_pack_id ?: '',
'#icon' => $icon_id ?: '',
'#settings' => $value['icon_settings'][$icon_pack_id] ?? [],
];
This maybe be an issue because:
ui_icon
render elements but the inline_template
render element insteadui_icon
render element, if someone is extending ui_icons
by adding a pre_render callback, it will not be triggered2 proposals.
IconDefinition::getRenderable()
logic move to Drupal\ui_icons\Element\Icon
render elementIconDefinition::getRenderable()
or:
IconDefinition::getRenderable()
logic stay here and Drupal\ui_icons\Element\Icon
render element is the only one to call this methodIconDefinition::getRenderable()
Closed: duplicate
1.0
Code
Fixed in 📌 [Meta Beta release] Clean code, no default template, better preview Fixed