예제 #1
0
 /**
  * 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;
 }
예제 #2
0
 /**
  * @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;
 }