Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
thampe committed Apr 12, 2021
1 parent c8a926e commit 5f130a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Framework/View/TemplateEngine/Twig.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
use Twig\TemplateWrapper;
use Twig\TwigFilter;
use Twig\TwigFunction;
use Twig\Extra\String\StringExtension;


class Twig extends Php
{
Expand Down Expand Up @@ -106,6 +108,7 @@ private function initTwig()

$this->twig->addFilter(new TwigFilter('trans', '__'));
$this->twig->addExtension(new DebugExtension());
$twig->addExtension(new StringExtension());
$this->eventManager->dispatch('twig_init', ['twig' => $this->twig]);
}

Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"magento/framework": ">=100.0.0",
"magento/module-backend": ">=100.0.0",
"magento/module-config": ">=100.0.0",
"twig/twig": "^3.0"
"twig/twig": "^3.0",
"twig/string-extra":"^3.3"
},
"type": "magento2-module",
"version": "2.0.1",
Expand Down

0 comments on commit 5f130a2

Please sign in to comment.