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