From cbc7e3aeaa0a626e14dab855eb12da175e091ba4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Tue, 7 Sep 2021 06:30:38 +0200 Subject: [PATCH 1/1] Add download and base64 filters --- Extension/PackExtension.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Extension/PackExtension.php b/Extension/PackExtension.php index ac0071a..d32f5bf 100644 --- a/Extension/PackExtension.php +++ b/Extension/PackExtension.php @@ -18,6 +18,7 @@ use Twig\Extension\AbstractExtension; use Rapsys\PackBundle\Parser\TokenParser; use Rapsys\PackBundle\RapsysPackBundle; +use Rapsys\PackBundle\Util\IntlUtil; use Rapsys\PackBundle\Util\SluggerUtil; /** @@ -100,7 +101,10 @@ class PackExtension extends AbstractExtension { new \Twig\TwigFilter('slug', [$this->slugger, 'slug']), new \Twig\TwigFilter('intldate', [$this->intl, 'date'], ['needs_environment' => true]), new \Twig\TwigFilter('intlnumber', [$this->intl, 'number']), - new \Twig\TwigFilter('intlcurrency', [$this->intl, 'currency']) + new \Twig\TwigFilter('intlcurrency', [$this->intl, 'currency']), + new \Twig\TwigFilter('download', 'file_get_contents', [false, null]), + new \Twig\TwigFilter('base64_encode', 'base64_encode'), + new \Twig\TwigFilter('base64_decode', 'base64_decode') ]; } -- 2.41.1