Skip to content

Commit 35a5826

Browse files
committed
updated demo code to use the non-deprecated features of Twig
1 parent 281cced commit 35a5826

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Acme/DemoBundle/Twig/Extension/DemoExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function setController($controller)
2525
public function getFunctions()
2626
{
2727
return array(
28-
'code' => new \Twig_Function_Method($this, 'getCode', array('is_safe' => array('html'))),
28+
new \Twig_SimpleFunction('code', array($this, 'getCode'), array('is_safe' => array('html'))),
2929
);
3030
}
3131

0 commit comments

Comments
 (0)