From 35a582628efd5ab69d9438c64d529ca8d264f9ce Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 6 Aug 2013 11:11:50 +0200 Subject: [PATCH] updated demo code to use the non-deprecated features of Twig --- src/Acme/DemoBundle/Twig/Extension/DemoExtension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Acme/DemoBundle/Twig/Extension/DemoExtension.php b/src/Acme/DemoBundle/Twig/Extension/DemoExtension.php index a96a885307..def07573dd 100644 --- a/src/Acme/DemoBundle/Twig/Extension/DemoExtension.php +++ b/src/Acme/DemoBundle/Twig/Extension/DemoExtension.php @@ -25,7 +25,7 @@ public function setController($controller) public function getFunctions() { return array( - 'code' => new \Twig_Function_Method($this, 'getCode', array('is_safe' => array('html'))), + new \Twig_SimpleFunction('code', array($this, 'getCode'), array('is_safe' => array('html'))), ); }