ILIAS  release_7 Revision v7.30-3-g800a261c036
ilCertificatePathFactory Class Reference
+ Collaboration diagram for ilCertificatePathFactory:

Public Member Functions

 create (ilObject $object)
 

Detailed Description

Member Function Documentation

◆ create()

ilCertificatePathFactory::create ( ilObject  $object)

Definition at line 9 of file class.ilCertificatePathFactory.php.

10 {
11 $type = $object->getType();
12
13 switch ($type) {
14 case 'tst':
15 $certificatePath = ilCertificatePathConstants::TEST_PATH . $object->getId() . '/';
16 break;
17 case 'crs':
18 $certificatePath = ilCertificatePathConstants::COURSE_PATH . $object->getId() . '/';
19 break;
20 case 'sahs':
21 $certificatePath = ilCertificatePathConstants::SCORM_PATH . $object->getId() . '/';
22 break;
23 case 'exc':
24 $certificatePath = ilCertificatePathConstants::EXERCISE_PATH . $object->getId() . '/';
25 break;
26 case 'lti':
27 $certificatePath = ilCertificatePathConstants::LTICON_PATH . $object->getId() . '/';
28 break;
29 case 'cmix':
30 $certificatePath = ilCertificatePathConstants::CMIX_PATH . $object->getId() . '/';
31 break;
32 case 'prg':
33 $certificatePath = ilCertificatePathConstants::STUDY_PROGRAMME_PATH . $object->getId() . '/';
34 break;
35 default:
36 throw new ilException(sprintf(
37 'The type "%s" is currently not supported for certificates',
38 $type
39 ));
40 break;
41 }
42
43 return $certificatePath;
44 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getType()
get object type @access public
getId()
get object id @access public
$type

References $type, ilCertificatePathConstants\CMIX_PATH, ilCertificatePathConstants\COURSE_PATH, ilCertificatePathConstants\EXERCISE_PATH, ilObject\getId(), ilObject\getType(), ilCertificatePathConstants\LTICON_PATH, ilCertificatePathConstants\SCORM_PATH, ilCertificatePathConstants\STUDY_PROGRAMME_PATH, and ilCertificatePathConstants\TEST_PATH.

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: