File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1515use Omines \DataTablesBundle \DataTable ;
1616use Symfony \Component \Translation \TranslatorInterface ;
1717
18- class DataTablesExtension extends \Twig_Extension
18+ class DataTablesExtension extends \Twig \ Extension \AbstractExtension
1919{
2020 /** @var TranslatorInterface */
2121 protected $ translator ;
@@ -36,7 +36,7 @@ public function __construct(TranslatorInterface $translator)
3636 public function getFunctions ()
3737 {
3838 return [
39- new \Twig_SimpleFunction ('datatable_settings ' , function (DataTable $ dataTable ) {
39+ new \Twig \ TwigFunction ('datatable_settings ' , function (DataTable $ dataTable ) {
4040 return json_encode ([
4141 'name ' => $ dataTable ->getName (),
4242 'method ' => $ dataTable ->getMethod (),
Original file line number Diff line number Diff line change 1515use Omines \DataTablesBundle \DataTable ;
1616use Omines \DataTablesBundle \DataTableRendererInterface ;
1717use Omines \DataTablesBundle \Exception \MissingDependencyException ;
18- use Twig_Environment ;
18+ use Twig \ Environment ;
1919
2020/**
2121 * TwigRenderer.
@@ -30,9 +30,9 @@ class TwigRenderer implements DataTableRendererInterface
3030 /**
3131 * DataTableRenderer constructor.
3232 *
33- * @param Twig_Environment $twig
33+ * @param Environment $twig
3434 */
35- public function __construct (Twig_Environment $ twig = null )
35+ public function __construct (Environment $ twig = null )
3636 {
3737 if (null === ($ this ->twig = $ twig )) {
3838 throw new MissingDependencyException ('You must have symfony/twig-bundle installed to use the default Twig based DataTables rendering ' );
You can’t perform that action at this time.
0 commit comments