Example #1
0
 /**
  * @return Grid
  */
 protected function createGrid()
 {
     $selection = $this->xxxFacade->all();
     $grid = $this->createPreparedGrid();
     $grid->setModel($selection);
     $grid->addColumnText('id', '#')->setSortable()->setFilterNumber();
     $grid->addActionHref('edit', 'Upravit')->setIcon('pencil')->getElementPrototype()->class = 'btn-dark-blue';
     return $grid;
 }
Example #2
0
 /**
  * @param Form $form
  */
 public function add(Form $form)
 {
     $values = $form['basic']->getValues();
     $record = $this->xxxFacade->add($values);
     $this->xxxId = $record->id;
 }
 /**
  * @return SelectBox
  */
 public function create()
 {
     $items = $this->xxxFacade->all()->fetchPairs('id', 'name');
     return new SelectBox('Label', $items);
 }