From eaef9a97d3a226338561d472a373e6e9a9f46bb7 Mon Sep 17 00:00:00 2001 From: Frank Beentjes Date: Sat, 10 Mar 2018 22:18:37 +0100 Subject: [PATCH] removed deprecated Twig_Function_Method function Use Twig_SimpleFunction now --- Twig/Extensions/Extension/PdfExtension.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Twig/Extensions/Extension/PdfExtension.php b/Twig/Extensions/Extension/PdfExtension.php index b2df9ca..f592763 100644 --- a/Twig/Extensions/Extension/PdfExtension.php +++ b/Twig/Extensions/Extension/PdfExtension.php @@ -8,7 +8,7 @@ namespace Ps\PdfBundle\Twig\Extensions\Extension; -use Ps\PdfBundle\Templating\ImageLocatorInterface; +use Ps\PdfBundle\Templating\ImageLocator; /** * Twig extension @@ -19,7 +19,7 @@ class PdfExtension extends \Twig_Extension { private $imageLocator; - public function __construct(ImageLocatorInterface $imageLocator) + public function __construct(ImageLocator $imageLocator) { $this->imageLocator = $imageLocator; } @@ -27,7 +27,7 @@ public function __construct(ImageLocatorInterface $imageLocator) public function getFunctions() { return array( - new \Twig_SimpleFunction('pdf_image', array($this, 'getImagePath')), + 'pdf_image' => new \Twig_SimpleFunction('getImagePath', [$this, 'getImagePath']), ); }