- Issue created by @mherchel
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
So this would require changing
\Drupal\Core\Template\TwigExtension::addClass()
and friends.IMHO Twig Filters do not make sense to apply to an array of render arrays. The problem grows more complex too: what about an array of arrays of render arrays (i.e. with an extra level of indirection)? What about an array that contains both render arrays directly and indirectly?
The better solutions IMHO, because they would be more reliable:
- — captured as in 📌 [SPIKE] Comprehensive plan for integrating with SDC Active
- restricting what the accepted contents are of a slot — captured as in
📌
[SPIKE] Comprehensive plan for integrating with SDC
Active
. ← Applied to this issue, that would mean that a slot only accepts a render element (i.e.
['#type' => …, … => …]
) render array, not an arbitrary render array. That'd then allow using theadd_class
Twig filter without changing it.