19declare(strict_types=1);
51 $this->resource_storage = $resourceStorage;
52 $this->upload_service = $uploadService;
63 int $size = self::IMAGE_SIZE_XS
68 $identification = $this->resource_storage->manage()->find($badge->
getImageRid());
69 if ($identification !==
null) {
70 $image_src = $this->resource_storage->consume()->src($identification)->getSrc();
83 $array_result = $this->upload_service->getResults();
84 $array_result = array_pop($array_result);
86 $identification = $this->resource_storage->manage()->upload($array_result, $stakeholder);
90 $this->main_template->setOnScreenMessage(
'failure',
$e->getMessage(),
true);
99 return $this->resource_storage->manage()->clone($identification)->serialize();
ilGlobalTemplateInterface $main_template
getImageFromResourceId(ilBadge $badge, int $size=self::IMAGE_SIZE_XS)
FileUpload $upload_service
cloneBadgeImageByRid(ResourceIdentification $identification)
processImageUpload(ilBadge $badge)
__construct(Services $resourceStorage, FileUpload $uploadService, ilGlobalTemplateInterface $main_template)
Services $resource_storage
getImageFromBadge(ilBadge $badge, int $size=self::IMAGE_SIZE_XS)
Class IllegalStateException.
Class ResourceIdentification.
getImagePath(bool $a_full_path=true)
setImageRid(?string $image_rid)
static signFile(string $path_to_file)