ILIAS  trunk Revision v11.0_alpha-1731-gff9cd7e2bd3
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilCertificatePdfFilename.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
25 {
26  public function __construct(private readonly ilLanguage $lng)
27  {
28  $this->lng->loadLanguageModule('certificate');
29  }
30 
31  public function createFileName(ilUserCertificatePresentation $presentation): string
32  {
33  $basename = $this->lng->txt('certificate_file_basename');
34  if ('' === trim($basename)) {
35  $basename = 'Certificate';
36  }
37 
38  return $basename . '.pdf';
39  }
40 }
__construct(private readonly ilLanguage $lng)
createFileName(ilUserCertificatePresentation $presentation)
global $lng
Definition: privfeed.php:31