/** * Create * * @param GridInterface $grid * @param object $data * * @return Datagrid */ public function create(GridInterface $grid, $data) { $builder = $this->builder->create($data); $grid->buildGrid($builder); $datagrid = $builder->build(); $this->handleOptions($grid, $datagrid); return $datagrid; }
/** * @param GridInterface $grid * @param object $data * @param int $page * * @return Datagrid */ private function prepareGrid(GridInterface $grid, $data, $page = 1) { $builder = $this->builder->create($data); $builder->setLimit(1000); $builder->setPage($page); $grid->buildGrid($builder); $datagrid = $builder->build(); return $datagrid; }