19 declare(strict_types=1);
36 string $translatedErrorText =
'',
41 if (null === $ilUtilHelper) {
46 if (null === $errorHandler) {
48 $errorHandler = $DIC[
'ilErr'];
55 public function createPDF(
int $userId,
int $objectId): string
57 return $this->pdfGenerator->generateCurrentActiveCertificate($userId, $objectId);
60 public function downloadPdf(
int $userId,
int $objectId): string
63 $pdfScalar = $this->
createPDF($userId, $objectId);
65 $fileName = $this->pdfGenerator->generateFileName($userId, $objectId);
67 $this->ilUtilHelper->deliverData(
73 $this->errorHandler->raiseError($this->translatedErrorText, $this->errorHandler->MESSAGE);
Class ilPdfGeneratorConstantsTest.
ilPdfGenerator $pdfGenerator
__construct(ilLogger $logger, ilPdfGenerator $pdfGenerator, ?ilCertificateUtilHelper $ilUtilHelper=null, string $translatedErrorText='', ?ilErrorHandling $errorHandler=null)
Just a wrapper class to create Unit Test for other classes.
ilErrorHandling $errorHandler
Error Handling & global info handling uses PEAR error class.
ilCertificateUtilHelper $ilUtilHelper
createPDF(int $userId, int $objectId)
string $translatedErrorText
downloadPdf(int $userId, int $objectId)