ILIAS  release_8 Revision v8.24
class.ilCertificatePathFactory.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
25{
26 public function create(ilObject $object): string
27 {
28 $type = $object->getType();
29
30 switch ($type) {
31 case 'tst':
32 $certificatePath = ilCertificatePathConstants::TEST_PATH . $object->getId() . '/';
33 break;
34 case 'crs':
35 $certificatePath = ilCertificatePathConstants::COURSE_PATH . $object->getId() . '/';
36 break;
37 case 'sahs':
38 $certificatePath = ilCertificatePathConstants::SCORM_PATH . $object->getId() . '/';
39 break;
40 case 'exc':
41 $certificatePath = ilCertificatePathConstants::EXERCISE_PATH . $object->getId() . '/';
42 break;
43 case 'lti':
44 $certificatePath = ilCertificatePathConstants::LTICON_PATH . $object->getId() . '/';
45 break;
46 case 'cmix':
47 $certificatePath = ilCertificatePathConstants::CMIX_PATH . $object->getId() . '/';
48 break;
49 case 'prg':
50 $certificatePath = ilCertificatePathConstants::STUDY_PROGRAMME_PATH . $object->getId() . '/';
51 break;
52 default:
53 throw new ilException(sprintf(
54 'The type "%s" is currently not supported for certificates',
55 $type
56 ));
57 }
58
59 return $certificatePath;
60 }
61}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$type