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:
@@ -24,13 +24,15 @@ namespace Chill\MainBundle\Routing;
|
||||
use Chill\MainBundle\Routing\MenuComposer;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Twig\Extension\AbstractExtension;
|
||||
use Twig\TwigFunction;
|
||||
|
||||
/**
|
||||
* Add the filter 'chill_menu'
|
||||
*
|
||||
* @author Julien Fastré <julien arobase fastre point info>
|
||||
*/
|
||||
class MenuTwig extends \Twig_Extension implements ContainerAwareInterface
|
||||
class MenuTwig extends AbstractExtension implements ContainerAwareInterface
|
||||
{
|
||||
|
||||
/**
|
||||
@@ -63,7 +65,7 @@ class MenuTwig extends \Twig_Extension implements ContainerAwareInterface
|
||||
|
||||
public function getFunctions()
|
||||
{
|
||||
return [new \Twig_SimpleFunction('chill_menu',
|
||||
return [new TwigFunction('chill_menu',
|
||||
array($this, 'chillMenu'), array(
|
||||
'is_safe' => array('html'),
|
||||
'needs_environment' => true
|
||||
|
Reference in New Issue
Block a user