Screenshot

Simple grid with an ORM source

<?phpnamespaceMyProject\MyBundle\Controller;useAPY\DataGridBundle\Grid\Source\Entity;classDefaultControllerextendsController{publicfunctionmyGridAction() {// Creates a simple grid based on your entity (ORM)$source=newEntity('MyProjectMyBundle:MyEntity');// Get a Grid instance$grid=$this->get('grid');// Attach the source to the grid$grid->setSource($source);// Return the response of the grid to the templatereturn$grid->getGridResponse('MyProjectMyBundle::myGrid.html.twig'); }}