Exemplo n.º 1
0
 public function formAction()
 {
     $em = $this->em;
     $grid = $this->grid();
     $qb = $em->getRepository('\\My\\Entity\\Bug')->createQueryBuilder('c');
     $source = new Bvb_Grid_Source_Doctrine2($qb, $em);
     $grid->setSource($source);
     $form = new Bvb_Grid_Form();
     $form->setBulkAdd(1)->setAdd(true)->setEdit(true)->setBulkDelete(true)->setBulkEdit(true)->setDelete(true)->setAddButton(true);
     $grid->setForm($form);
     $this->view->pages = $grid->deploy();
     $this->renderScript('site/index.phtml');
 }
Exemplo n.º 2
0
 public function form1Action()
 {
     $grid = $this->grid();
     $grid->query($this->_db->select()->from('form'));
     $form = new Bvb_Grid_Form();
     $form->setBulkAdd(5)->setAdd(true)->setEdit(true)->setBulkDelete(true)->setBulkEdit(true)->setDelete(true)->setAddButton(true);
     $form->setUseVerticalInputs(false);
     $grid->setForm($form);
     $this->view->pages = $grid->deploy();
     $this->render('index');
 }