Esempio n. 1
0
 /**
  * @param int $id
  * @throws \Model\RecordNotFoundException
  */
 public function load($id)
 {
     $record = $this->xxxFacade->all()->get($id);
     if (!$record) {
         throw new RecordNotFoundException();
     }
     $this['form']['basic']->setDefaults($record);
     $this->xxxId = $id;
 }
Esempio n. 2
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;
 }
Esempio n. 3
0
 /**
  * @return SelectBox
  */
 public function create()
 {
     $items = $this->xxxFacade->all()->fetchPairs('id', 'name');
     return new SelectBox('Label', $items);
 }