Esempio n. 1
0
 /**
  * @param Form $form
  */
 public function formSucceeded(Form $form)
 {
     $values = $form->getValues();
     /** @var PicturesEntity $pictures */
     $pictures = $this->picturesRepository->get($values->id);
     $pictures->name($values->name);
     $pictures->description($values->description);
     $pictures->file($values->file);
     $pictures->order($values->order);
     $pictures->galleryId($values->galleryId);
     $this->picturesRepository->save($pictures);
 }
Esempio n. 2
0
 /**
  * @param $id
  */
 public function handleDeletePicture($id)
 {
     $picture = $this->picturesRepository->get($id);
     $this->picturesRepository->delete($id);
     $this->flashMessage('Obrázek byl odstraněn z galerie.', 'success');
     $this->redirect('Galleries:edit', $picture->galleryId());
 }