File tree 3 files changed +10
-6
lines changed
3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ parameters:
52
52
phantomjs.template.template_renderer.class : JonnyW\PhantomJs\Template\TemplateRenderer
53
53
phantomjs.twig.environment.class : Twig_Environment
54
54
phantomjs.twig.lexer.class : Twig_Lexer
55
- phantomjs.twig.string_loader .class : Twig_Loader_String
55
+ phantomjs.twig.array_loader .class : Twig_Loader_Array
56
56
57
57
# #################
58
58
# ## RESOURCES ####
Original file line number Diff line number Diff line change @@ -128,11 +128,13 @@ services:
128
128
phantomjs.twig.environment :
129
129
class : " %phantomjs.twig.environment.class%"
130
130
arguments :
131
- - " @phantomjs.twig.string_loader "
131
+ - " @phantomjs.twig.array_loader "
132
132
public : false
133
133
134
- phantomjs.twig.string_loader :
135
- class : " %phantomjs.twig.string_loader.class%"
134
+ phantomjs.twig.array_loader :
135
+ class : " %phantomjs.twig.array_loader.class%"
136
+ arguments :
137
+ - []
136
138
public : false
137
139
138
140
phantomjs.procedure.template_renderer :
@@ -144,7 +146,7 @@ services:
144
146
phantomjs.procedure.twig.environment :
145
147
class : " %phantomjs.twig.environment.class%"
146
148
arguments :
147
- - " @phantomjs.twig.string_loader "
149
+ - " @phantomjs.twig.array_loader "
148
150
public : false
149
151
calls :
150
152
- [ "setLexer", [ "@phantomjs.procedure.twig.lexer" ] ]
Original file line number Diff line number Diff line change @@ -44,6 +44,8 @@ public function __construct(\Twig_Environment $twig)
44
44
*/
45
45
public function render ($ template , array $ context = array ())
46
46
{
47
- return $ this ->twig ->render ($ template , $ context );
47
+ $ template = $ this ->twig ->createTemplate ($ template );
48
+
49
+ return $ template ->render ($ context );
48
50
}
49
51
}
You can’t perform that action at this time.
0 commit comments