patternengine-php-twig
patternengine-php-twig copied to clipboard
Support Adding Twig Globals
https://twig.symfony.com/doc/2.x/advanced.html#id1
I've actually already got a working POC patch for this that we've been using to share certain Design Token values across our Design System in a way that is Drupal / Grav friendly (vs only being available to PL):
https://github.com/bolt-design-system/bolt/blob/develop/.patches/addTwigGlobals.patch
https://github.com/bolt-design-system/bolt/blob/develop/packages/bolt-twig-extensions/globals/bolt-image-sizes.global.php
My question for @aleksip and @EvanLovely is about the way this extension gets called since I tried to do things in a more Symphony like way (in how this gets called). Thoughts?