PHPackages                             shapecode/twig-template-event-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. shapecode/twig-template-event-bundle

ActiveSymfony-bundle[Templating &amp; Views](/categories/templating)

shapecode/twig-template-event-bundle
====================================

Possibility to add code in a twig template dynamically

6.0.0(5mo ago)1010.7k1[1 PRs](https://github.com/shapecode/twig-template-event-bundle/pulls)MITPHPPHP ^8.4CI passing

Since Jan 10Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/shapecode/twig-template-event-bundle)[ Packagist](https://packagist.org/packages/shapecode/twig-template-event-bundle)[ Docs](https://github.com/shapecode/twig-template-event-bundle)[ Fund](http://paypal.me/nloges)[ GitHub Sponsors](https://github.com/nicklog)[ RSS](/packages/shapecode-twig-template-event-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (20)Versions (22)Used By (0)

Shapecode - Twig Template Event Bundle
======================================

[](#shapecode---twig-template-event-bundle)

[![paypal](https://camo.githubusercontent.com/863cb4528d59447a96106e65c87541c857b3cc163ba9dd39edb9050bb5090618/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f6e6174652d50617970616c2d626c75652e737667)](http://paypal.me/nloges)

[![PHP Version](https://camo.githubusercontent.com/dd2725783846dd94e25f1041e1dd5c2fab5e266c625183abfb4bcfbf17908266/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7368617065636f64652f747769672d74656d706c6174652d6576656e742d62756e646c652e737667)](https://packagist.org/packages/shapecode/twig-template-event-bundle)[![Latest Stable Version](https://camo.githubusercontent.com/df3a63c85bc18af60031d3388756dd28decdfdd636fac642ae21961da5575ac2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7368617065636f64652f747769672d74656d706c6174652d6576656e742d62756e646c652e7376673f6c6162656c3d737461626c65)](https://packagist.org/packages/shapecode/twig-template-event-bundle)[![Latest Unstable Version](https://camo.githubusercontent.com/453479074fd3c02ce2fc202aed1c1ca161448bf0d768f4a95ea0082662326c9d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f767072652f7368617065636f64652f747769672d74656d706c6174652d6576656e742d62756e646c652e7376673f6c6162656c3d756e737461626c65)](https://packagist.org/packages/shapecode/twig-template-event-bundle)[![Total Downloads](https://camo.githubusercontent.com/f1fe68688f1cfd23156b1b3d79694db69b72430b9f90b739898e8d8a8649245d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7368617065636f64652f747769672d74656d706c6174652d6576656e742d62756e646c652e737667)](https://packagist.org/packages/shapecode/twig-template-event-bundle)[![Monthly Downloads](https://camo.githubusercontent.com/94f379e67f80165ff216e4e21ed687d0a32ef85604f17767a2e7c5872092a8ef/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f7368617065636f64652f747769672d74656d706c6174652d6576656e742d62756e646c652e737667)](https://packagist.org/packages/shapecode/twig-template-event-bundle)[![Daily Downloads](https://camo.githubusercontent.com/bec9271054667e2a7eb4d30c31aab0f85ead7637535aa5e7ad8998cc3c0e1c85/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64642f7368617065636f64652f747769672d74656d706c6174652d6576656e742d62756e646c652e737667)](https://packagist.org/packages/shapecode/twig-template-event-bundle)[![License](https://camo.githubusercontent.com/38c4b9713ceff5a3783df306953958892c10c514d5699488ae6035dfc3c193f7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7368617065636f64652f747769672d74656d706c6174652d6576656e742d62756e646c652e737667)](https://packagist.org/packages/shapecode/twig-template-event-bundle)

Give you the possibility to add code in a twig template dynamically.

Install instructions
--------------------

[](#install-instructions)

First you need to add `shapecode/twig-template-event-bundle` to `composer.json`:

```
composer require shapecode/twig-template-event-bundle
```

... or ...

```
{
   "require": {
        "shapecode/twig-template-event-bundle": "~5.0"
    }
}
```

If you dont use Symfony Flex you have to add `ShapecodeTwigTemplateEventBundle` to your `bundles.php`:

```
