ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilCertificateSettingsExerciseRepository.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
24 
29 {
32  private ilObject $object;
33 
34  public function __construct(
35  ilObject $object,
36  string $certificatePath,
37  bool $hasAdditionalElements,
38  ilLanguage $language,
39  ilCtrlInterface $ctrl,
40  ilAccessHandler $access,
41  ilToolbarGUI $toolbar,
42  ilCertificatePlaceholderDescription $placeholderDescriptionObject,
43  ?ilCertificateSettingsFormRepository $settingsFormFactory = null
44  ) {
45  $this->object = $object;
46  $this->language = $language;
47 
48  if (null === $settingsFormFactory) {
49  $settingsFormFactory = new ilCertificateSettingsFormRepository(
50  $object->getId(),
51  $certificatePath,
52  $hasAdditionalElements,
53  $language,
54  $ctrl,
55  $access,
56  $toolbar,
57  $placeholderDescriptionObject
58  );
59  }
60 
61  $this->settingsFormFactory = $settingsFormFactory;
62  }
63 
74  public function createForm(ilCertificateGUI $certificateGUI): ilPropertyFormGUI
75  {
76  return $this->settingsFormFactory->createForm($certificateGUI);
77  }
78 
79  public function save(array $formFields): void
80  {
81  }
82 
83  public function fetchFormFieldData(string $content): array
84  {
85  return $this->settingsFormFactory->fetchFormFieldData($content);
86  }
87 }
GUI class to create PDF certificates.
__construct(ilObject $object, string $certificatePath, bool $hasAdditionalElements, ilLanguage $language, ilCtrlInterface $ctrl, ilAccessHandler $access, ilToolbarGUI $toolbar, ilCertificatePlaceholderDescription $placeholderDescriptionObject, ?ilCertificateSettingsFormRepository $settingsFormFactory=null)