56        $userCertificate = $userCertificateRepository->fetchActiveCertificate($userId, $objectId);
 
   58        $dirPath = self::PERSISTENT_CERTIFICATES_DIRECTORY . $userId . 
'/' . $objectId;
 
   59        if (
false === $this->filesystem->hasDir($dirPath)) {
 
   60            $this->filesystem->createDir($dirPath);
 
   63        $pdfGenerator = 
new ilPdfGenerator($userCertificateRepository, $this->logger);
 
   65        $pdfScalar = $pdfGenerator->generate($userCertificate->getId());
 
   68        if ($this->filesystem->has($completePath)) {
 
   69            $this->filesystem->delete($completePath);
 
   72        $this->filesystem->write($completePath, $pdfScalar);
 
   83        $dirPath = self::PERSISTENT_CERTIFICATES_DIRECTORY . $userId . 
'/' . $objectId;
 
   86        $completePath = $dirPath . 
'/' . $fileName;
 
   87        if ($this->filesystem->has($completePath)) {
 
   90            $userCertificate = $userCertificateRepository->fetchActiveCertificateForPresentation($userId, $objectId);
 
   93            $delivery = new \ilFileDelivery($downloadFilePath);
 
   95            $delivery->setConvertFileNameToAsci(
true);
 
  108        $dirPath = self::PERSISTENT_CERTIFICATES_DIRECTORY . $userId;
 
  110        if (
true === $this->filesystem->hasDir($dirPath)) {
 
  111            $this->filesystem->deleteDir($dirPath);
 
  123        $dirPath = self::PERSISTENT_CERTIFICATES_DIRECTORY . $userId;
 
  127        if ($this->filesystem->has($completePath)) {
 
  128            $this->filesystem->delete($completePath);
 
  141        $dirPath = self::PERSISTENT_CERTIFICATES_DIRECTORY . $userId . 
'/' . $objectId . 
'/';
 
  143        $completePath = $dirPath . $fileName;
 
  144        if ($this->filesystem->has($completePath)) {
 
  148        throw new ilException(sprintf(
'Certificate File does not exist in "%s"', $completePath));
 
An exception for terminatinating execution or to throw for unit testing.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getValidFilename($a_filename)
Get valid filename.
Component logger with individual log levels by component id.
const CERTIFICATE_FILENAME
deleteUserDirectory(int $userId)
__construct(Filesystem $filesystem=null, ilLogger $logger=null)
const PERSISTENT_CERTIFICATES_DIRECTORY
createCertificateFile(int $userId, int $objectId)
deleteCertificateFile(int $userId, int $objectId)
createCertificateFilePath(int $userId, int $objectId)
deliverCertificate(int $userId, int $objectId)
Interface Filesystem The filesystem interface provides the public interface for the Filesystem servic...
Class FlySystemFileAccessTest \Provider\FlySystem @runTestsInSeparateProcesses @preserveGlobalState d...
Class ilPdfGeneratorConstantsTest.