Symfony2 – Creating a Twig Extension

http://dev.dbl-a.com/symfony-2-0/symfony2-creating-a-twig-extension/