Reputation: 596
Does anyone one know where to enable Twig's dump function in ZF2?
I've looked all over Google and I can't find anything that really relates to this issue. I would have though the ZFC-Twig module would have it right in their config but it doesn't appear to be.
Thanks
Upvotes: 5
Views: 1148
Reputation: 1742
According to Twig documentation, you need to activate Twig_Extension_Debug extension to have this function available.
In ZfcTwig module just add this extension to config (doc):
'zfctwig' => [
'extensions' => [
'Twig_Extension_Debug',
],
],
Upvotes: 5
Reputation: 244
If you're using Zfc-Twig, you can enable debug feature by enabling it through environment_options like this:
<?php
// enable debug
return array(
'zfctwig' => array(
'environment_options' => array(
'debug' => true
)
)
);
Upvotes: 3