• Fabien Potencier's avatar
    added a Twig extension · cda8dce8
    Fabien Potencier authored
    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') }}
    cda8dce8
Name
Last commit
Last update
..
Exception Loading commit data...
Application.php Loading commit data...
Compiler.php Loading commit data...
Controller.php Loading commit data...
ControllerCollection.php Loading commit data...
Events.php Loading commit data...
ExtensionInterface.php Loading commit data...
GetResponseForErrorEvent.php Loading commit data...
StringResponseConverter.php Loading commit data...
TwigExtension.php Loading commit data...
WebTestCase.php Loading commit data...