19declare(strict_types=1);
54 $userCertificate = $userCertificateRepository->fetchActiveCertificate($userId, $objectId);
56 $dirPath = self::PERSISTENT_CERTIFICATES_DIRECTORY . $userId .
'/' . $objectId;
63 $pdfScalar = $pdfGenerator->generate($userCertificate->getId());
70 $this->
filesystem->write($completePath, $pdfScalar);
79 $dirPath = self::PERSISTENT_CERTIFICATES_DIRECTORY . $userId .
'/' . $objectId;
82 $completePath = $dirPath .
'/' . $fileName;
86 $userCertificate = $userCertificateRepository->fetchActiveCertificateForPresentation($userId, $objectId);
101 $dirPath = self::PERSISTENT_CERTIFICATES_DIRECTORY . $userId;
114 $dirPath = self::PERSISTENT_CERTIFICATES_DIRECTORY . $userId;
128 $dirPath = self::PERSISTENT_CERTIFICATES_DIRECTORY . $userId .
'/' . $objectId .
'/';
130 $completePath = $dirPath . $fileName;
135 throw new ilException(sprintf(
'Certificate File does not exist in "%s"', $completePath));
Indicates that a file is missing or not found.
Indicates general problems with the input or output operations.
Base class for ILIAS Exception handling.
static deliverFileAttached(string $path_to_file, ?string $download_file_name=null, ?string $mime_type=null, bool $delete_file=false)
static getValidFilename(string $a_filename)
const CERTIFICATE_FILENAME
deleteUserDirectory(int $userId)
const PERSISTENT_CERTIFICATES_DIRECTORY
createCertificateFile(int $userId, int $objectId)
__construct(?Filesystem $filesystem=null)
readonly Filesystem $filesystem
deleteCertificateFile(int $userId, int $objectId)
createCertificateFilePath(int $userId, int $objectId)
deliverCertificate(int $userId, int $objectId)
The filesystem interface provides the public interface for the Filesystem service API consumer.