The twig documentation says:
debug boolean
When set to true, the generated templates have a __toString() method that you can use to display the generated nodes (default to false).
Which sounds fabulous but how do I actually make use of it? I mean in which file and on which object would I call __toString()
on?
It says that it's on "the generated templates" – whatever that means. I've tried doing $this->__toString()
from within a generated template but it doesn't recognise that method (and yes I've confirmed that the debug option is enabled).