ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilCertificatePdfFilename.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2018 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
8 {
10  private $lng;
11 
16  public function __construct(\ilLanguage $lng)
17  {
18  $this->lng = $lng;
19 
20  $this->lng->loadLanguageModule('certificate');
21  }
22 
26  public function createFileName(ilUserCertificatePresentation $presentation) : string
27  {
28  $basename = $this->lng->txt('certificate_file_basename');
29  if (!is_string($basename) || 0 === trim($basename)) {
30  $basename = 'Certificate';
31  }
32 
33  return $basename . '.pdf';
34  }
35 }
__construct(\ilLanguage $lng)
ilCertificatePdfFileNameFactory constructor.
createFileName(ilUserCertificatePresentation $presentation)