19 declare(strict_types=1);
    32         private readonly 
string $translatedErrorText = 
'',
    35         if (null === $ilUtilHelper) {
    40         if (null === $errorHandler) {
    42             $errorHandler = $DIC[
'ilErr'];
    47     public function createPDF(
int $userId, 
int $objectId): string
    49         return $this->pdfGenerator->generateCurrentActiveCertificate($userId, $objectId);
    52     public function downloadPdf(
int $userId, 
int $objectId): string
    55             $pdfScalar = $this->
createPDF($userId, $objectId);
    57             $fileName = $this->pdfGenerator->generateFileName($userId, $objectId);
    59             $this->ilUtilHelper->deliverData(
    65             $this->errorHandler->raiseError($this->translatedErrorText, $this->errorHandler->MESSAGE);
 
readonly ilErrorHandling $errorHandler
 
readonly ilCertificateUtilHelper $ilUtilHelper
 
createPDF(int $userId, int $objectId)
 
__construct(private readonly ilPdfGenerator $pdfGenerator, ?ilCertificateUtilHelper $ilUtilHelper=null, private readonly string $translatedErrorText='', ?ilErrorHandling $errorHandler=null)
 
downloadPdf(int $userId, int $objectId)