ILIAS  release_8 Revision v8.24
class.ilCertificatePdfFileNameFactory.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
25{
27
28 public function __construct(ilLanguage $lng)
29 {
30 $this->lng = $lng;
31 }
32
33 public function create(ilUserCertificatePresentation $presentation): string
34 {
35 $objectType = $presentation->getObjType();
36
37 return $this->fetchCertificateGenerator($objectType)->createFileName($presentation);
38 }
39
40 private function fetchCertificateGenerator(string $objectType): ilCertificateFilename
41 {
42 $generator = new ilCertificatePdfFilename($this->lng);
43 if ('sahs' === $objectType) {
44 $generator = new ilCertificateScormPdfFilename($generator, $this->lng, new ilSetting('scorm'));
45 }
46
47 return $generator;
48 }
49}
create(ilUserCertificatePresentation $presentation)
language handling
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...