Beispiel #1
0
 protected function createComponentProduct() : Nette\Application\UI\Multiplier
 {
     return new Nette\Application\UI\Multiplier(function ($id) : Ytnuk\Shop\Product\Control {
         $entity = $this->productRepository->getById($id);
         if ($entity instanceof Ytnuk\Shop\Product\Entity) {
             return $this->productControl->create($entity);
         }
         return NULL;
     });
 }
Beispiel #2
0
 public function actionEdit(int $id)
 {
     if (!($this->entity = $this->repository->getById($id))) {
         $this->error();
     }
 }