Twig extension for Kint integration

2.0 2018-09-29 07:24 UTC

This package is auto-updated.

Last update: 2020-05-06 21:15:36 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() }}