/** * Grid column render * @param Partner $e * @return string */ public function nameRender($e) { return \Nette\Utils\Html::el("a")->setText($e->getName())->addAttributes(["href" => $e->getLink()]); }
private function partnerPictureHandle(Partner $incoming, Partner $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); } }