From ae8f950c435b0ea3640d83e36fdd5a4d20a5b7c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20B=C3=A9hier-D=C3=A9vigne?= Date: Sun, 5 Apr 2020 15:05:28 +0200 Subject: [PATCH] Fix twig extension loading --- src/BoltOpenAgendaExtension.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/BoltOpenAgendaExtension.php b/src/BoltOpenAgendaExtension.php index c3bc2be..987dfa2 100644 --- a/src/BoltOpenAgendaExtension.php +++ b/src/BoltOpenAgendaExtension.php @@ -5,6 +5,7 @@ use Bolt\Extension\Leskis\BoltOpenAgenda\OAEventsProvider; use Bolt\Extension\SimpleExtension; use CalendR\Extension\Silex\Provider\CalendRServiceProvider; +use CalendR\Extension\Twig\CalendRExtension; use Silex\Application; use Symfony\Component\HttpFoundation\ParameterBag; @@ -67,6 +68,14 @@ function ($app) { 'oaevents' => new OAEventsProvider($app['bolt-openagenda.config']) ) )); + + $app['twig'] = $app->extend( + 'twig', + function (\Twig_Environment $twig) use ($app) { + $twig->addExtension(new CalendRExtension($app['calendr']) ); + return $twig; + } + ); } /**