From 96e5c771567eda5961a7ad127f6d02e34e004d0b Mon Sep 17 00:00:00 2001 From: Bob den Otter Date: Tue, 10 Dec 2019 19:54:47 +0100 Subject: [PATCH] Update Extension.php --- src/Extension.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Extension.php b/src/Extension.php index efe6ae6..6878faf 100644 --- a/src/Extension.php +++ b/src/Extension.php @@ -44,16 +44,17 @@ public function getRoutes(): array public function initialize($cli = false): void { $this->addWidget(new ReferenceWidget()); + $this->addTwigExtension(new Twig()); $this->addTwigNamespace('reference-extension'); - $this->registerListener('kernel.response', [new EventListener(), 'handleEvent']); + $this->addListener('kernel.response', [new EventListener(), 'handleEvent']); } /** * Ran automatically, if the current request is from the command line (CLI). - * You can use this method to set up things in you extension. + * You can use this method to set up things in your extension. * * Note: This runs on every request. Make sure what happens here is quick * and efficient.