72 public function delete($templateTemplateId, $objectId)
74 $template = $this->templateRepository->fetchCurrentlyUsedCertificate($objectId);
76 $this->templateRepository->deleteTemplate($templateTemplateId, $objectId);
81 $this->objectHelper->lookupType($objectId),
93 $this->templateRepository->save($certificateTemplate);
105 if (null === $relativePath ||
'' === $relativePath) {
106 $relativePath =
'/certificates/default/background.jpg';
109 $pathInfo = pathinfo($relativePath);
111 $newFilePath = $pathInfo[
'dirname'] .
'/background.jpg.thumb.jpg';
113 $this->utilHelper->convertImage(
114 $this->rootDirectory . $relativePath,
115 $this->rootDirectory . $newFilePath,
const ILIAS_VERSION_NUMERIC
__construct(ilCertificateTemplateRepository $templateRepository, string $rootDirectory=CLIENT_WEB_DIR, ilCertificateUtilHelper $utilHelper=null, ilCertificateObjectHelper $objectHelper=null, $iliasVersion=ILIAS_VERSION_NUMERIC)
overwriteBackgroundImageThumbnail(ilCertificateTemplate $previousTemplate)
Just a wrapper class to create Unit Test for other classes.
hash(StreamInterface $stream, $algo, $rawOutput=false)
Calculate a hash of a Stream.