ILIAS
release_8 Revision v8.23
◀ ilDoc Overview
class.ilCertificatePathFactory.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
24
class
ilCertificatePathFactory
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
}
ilException
ilObject
$type
$type
Definition:
proxy_ylocal.php:10
ilCertificatePathConstants\SCORM_PATH
const SCORM_PATH
Definition:
class.ilCertificatePathConstants.php:31
ilCertificatePathConstants\TEST_PATH
const TEST_PATH
Definition:
class.ilCertificatePathConstants.php:29
ilCertificatePathConstants\STUDY_PROGRAMME_PATH
const STUDY_PROGRAMME_PATH
Definition:
class.ilCertificatePathConstants.php:34
ilCertificatePathFactory\create
create(ilObject $object)
Definition:
class.ilCertificatePathFactory.php:26
ilCertificatePathConstants\CMIX_PATH
const CMIX_PATH
Definition:
class.ilCertificatePathConstants.php:33
ilObject\getId
getId()
Definition:
class.ilObject.php:270
ilCertificatePathConstants\EXERCISE_PATH
const EXERCISE_PATH
Definition:
class.ilCertificatePathConstants.php:30
ilCertificatePathFactory
Definition:
class.ilCertificatePathFactory.php:24
ilCertificatePathConstants\COURSE_PATH
const COURSE_PATH
Definition:
class.ilCertificatePathConstants.php:28
ilObject\getType
getType()
Definition:
class.ilObject.php:291
ilCertificatePathConstants\LTICON_PATH
const LTICON_PATH
Definition:
class.ilCertificatePathConstants.php:32
Services
Certificate
classes
File
Template
Path
class.ilCertificatePathFactory.php
Generated on Wed Sep 3 2025 22:01:52 for ILIAS by
1.8.13 (using
Doxyfile
)