ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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 26 of file class.ilCertificatePathFactory.php.

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.

26  : 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  }
$type
+ Here is the call graph for this function:

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