mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-03 21:34:59 +00:00
sf4 resolve errors and depreciations
This commit is contained in:
@@ -22,6 +22,8 @@ namespace Chill\MainBundle\Templating\Widget;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Chill\MainBundle\Templating\Widget\WidgetInterface;
|
||||
use Chill\MainBundle\Templating\Events\DelegatedBlockRenderingEvent;
|
||||
use Twig\Extension\AbstractExtension;
|
||||
use Twig\TwigFunction;
|
||||
|
||||
/**
|
||||
* Add the function `chill_delegated_block`.
|
||||
@@ -49,7 +51,7 @@ use Chill\MainBundle\Templating\Events\DelegatedBlockRenderingEvent;
|
||||
*
|
||||
* @author Julien Fastré <julien.fastre@champs-libres.coop>
|
||||
*/
|
||||
class WidgetRenderingTwig extends \Twig_Extension
|
||||
class WidgetRenderingTwig extends AbstractExtension
|
||||
{
|
||||
|
||||
/**
|
||||
@@ -90,14 +92,14 @@ class WidgetRenderingTwig extends \Twig_Extension
|
||||
public function getFunctions()
|
||||
{
|
||||
return array(
|
||||
new \Twig_SimpleFunction('chill_delegated_block',
|
||||
new TwigFunction('chill_delegated_block',
|
||||
array($this, 'renderingWidget'),
|
||||
array(
|
||||
'is_safe' => array('html'),
|
||||
'needs_environment' => true,
|
||||
'deprecated' => true, 'alternative' => 'chill_widget'
|
||||
)),
|
||||
new \Twig_SimpleFunction('chill_widget',
|
||||
new TwigFunction('chill_widget',
|
||||
array($this, 'renderingWidget'),
|
||||
array('is_safe' => array('html'), 'needs_environment' => true))
|
||||
);
|
||||
|
Reference in New Issue
Block a user