View layer pattern where you only present what you have been given is fine and all, but how do you know what is available? Is there a \"list all defined variables\" function
So I got it working, partly a bit hackish:
twig: debug: 1
in app/config/config.yml
Add this to config_dev.yml
services:
debug.twig.extension:
class: Twig_Extensions_Extension_Debug
tags: [{ name: 'twig.extension' }]
sudo rm -fr app/cache/dev
print_r()
, I opened vendor/twig-extensions/lib/Twig/Extensions/Node/Debug.php
and changed print_r(
to d(
PS. I would still like to know how/where to grab the $twig environment to add filters and extensions.