added a Twig extension
Usage: $app = new Application(); $app->register(new TwigExtension(), array( 'twig.path' => __DIR__.'/../templates', 'twig.options' => array('cache' => __DIR__.'/../cache', 'debug' => true), )); The "app" variable is registered as a global variable, so it is accessible in all templates: $app['routing'] = new UrlGenerator(...); {{ app.routing.generate('homepage') }}
Showing
src/Silex/TwigExtension.php
0 → 100644
Please register or sign in to comment