Exemple #1
0
 private function articlePictureHandle(Article $incoming, Article $database)
 {
     if ($incoming->getPicture() == '') {
         $incoming->setPicture($database->getPicture());
     } else {
         $oldImageStorage = $database->getPicture();
         $this->imageService->removeResource($oldImageStorage);
         $identifier = $this->imageService->storeNetteFile($incoming->getPicture());
         $incoming->setPicture($identifier);
     }
 }