File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Framework/View/TemplateEngine Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 2020use Twig \TemplateWrapper ;
2121use Twig \TwigFilter ;
2222use Twig \TwigFunction ;
23+ use Twig \Extra \String \StringExtension ;
24+
2325
2426class Twig extends Php
2527{
@@ -106,6 +108,7 @@ private function initTwig()
106108
107109 $ this ->twig ->addFilter (new TwigFilter ('trans ' , '__ ' ));
108110 $ this ->twig ->addExtension (new DebugExtension ());
111+ $ twig ->addExtension (new StringExtension ());
109112 $ this ->eventManager ->dispatch ('twig_init ' , ['twig ' => $ this ->twig ]);
110113 }
111114
Original file line number Diff line number Diff line change 66 "magento/framework" : " >=100.0.0" ,
77 "magento/module-backend" : " >=100.0.0" ,
88 "magento/module-config" : " >=100.0.0" ,
9- "twig/twig" : " ^3.0"
9+ "twig/twig" : " ^3.0" ,
10+ "twig/string-extra" :" ^3.3"
1011 },
1112 "type" : " magento2-module" ,
1213 "version" : " 2.0.1" ,
You can’t perform that action at this time.
0 commit comments