示例#1
0
 /**
  * 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()]);
 }
示例#2
0
 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);
     }
 }