I have a problem and I don't find what's wrong, I would like to add a filter for twig and using DIC. The filter name is recognized in the template but the associated function it's not found : "Fatal error: Call to undefined function twig_my_new_filter() "
My code : <code> namespace Application\BlogBundle\Twig; use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Bundle\TwigBundle\Loader\FilesystemLoader; class BlogExtension extends \Twig_Extension { public function getFilters() { return array( 'my_filter' => new \Twig_Filter_Function('twig_my_new_filter'), ); } public function twig_my_new_filter($arg) { // ... } public function getName() { return 'blog'; } } </code> what's wrong ? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en