S0RIEN/DataGridBundle — Issue #45: move prepare function to twig
Author: S0RIEN
Created: 2011-10-17 16:22:03+00:00
State: open
Labels: Enhancement

when you are setting grid to template you are calling

$this->render('Foo:Page:index.html.twig', array('data' => $grid->prepare()));

new way can be

$this->render('Foo:Page:index.html.twig', array('data' => $grid));

and twig will call this function for you when you are drawing grid

grid(data, _self) will call prepare() function for data

its ok for all?