Multiple Twig_Extension in Symfony2
I want to register my custom Twig filters in a separate bundle (so I don't have one huge file).
I have Yaml configurations in each kit:
# services.yml
services:
twig.extension.[BundleName]:
class: Kuba\[BundleName]\Twig\AppExtension
public: false
tags:
- { name: twig.extension }
However, all the time the last (lexicographic) extension overrides the previous one.
How can I register more than one extension, and if that is not possible, what would be the best practice to split the code?
+3
source to share