Twig extension for Kint integration

3.0 2020-07-03 14:19 UTC

This package is auto-updated.

Last update: 2021-12-31 00:29:47 UTC


A Twig extension providing the familiar d() and s() functions for dumping data.

Note that features like the mini-trace, variable name detection, and modifiers will not work from inside twig templates.


$twig->addExtension(new Kint\Twig\TwigExtension());
{{ d(data, richMode, moreData, evenMoreData) }}

{{ s(data, plainMode) }}

Custom function names:

$ext = new Kint\Twig\TwigExtension();
    // Function name => Renderer
    'dump' => 'Kint\\Renderer\\RichRenderer',
{{ dump() }}