ILIAS  trunk Revision v11.0_alpha-2645-g16283d3b3f8
ILIAS\Exercise\Certificate\ExercisePlaceholderDescription Class Reference
+ Inheritance diagram for ILIAS\Exercise\Certificate\ExercisePlaceholderDescription:
+ Collaboration diagram for ILIAS\Exercise\Certificate\ExercisePlaceholderDescription:

Public Member Functions

 __construct (?ilDefaultPlaceholderDescription $defaultPlaceholderDescriptionObject=null, ?ilLanguage $language=null, ?ilUserDefinedFieldsPlaceholderDescription $userDefinedFieldPlaceHolderDescriptionObject=null)
 
 createPlaceholderHtmlDescription (?ilTemplate $template=null)
 This methods MUST return an array containing an array with the the description as array value. More...
 
 getPlaceholderDescriptions ()
 This method MUST return an array containing an array with the description as array value. More...
 
- Public Member Functions inherited from ilCertificatePlaceholderDescription
 createPlaceholderHtmlDescription ()
 

Private Attributes

readonly ilDefaultPlaceholderDescription $defaultPlaceHolderDescriptionObject
 
readonly ilLanguage $language
 
array $placeholder
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Exercise\Certificate\ExercisePlaceholderDescription::__construct ( ?ilDefaultPlaceholderDescription  $defaultPlaceholderDescriptionObject = null,
?ilLanguage  $language = null,
?ilUserDefinedFieldsPlaceholderDescription  $userDefinedFieldPlaceHolderDescriptionObject = null 
)

Definition at line 39 of file ExercisePlaceholderDescription.php.

References $DIC, ILIAS\Exercise\Certificate\ExercisePlaceholderDescription\$language, ILIAS\UI\examples\Symbol\Glyph\Language\language(), null, and ilLegacyFormElementsUtil\prepareFormOutput().

43  {
44  global $DIC;
45 
46  if (null === $language) {
47  $language = $DIC->language();
48  $language->loadLanguageModule('certificate');
49  }
50  $this->language = $language;
51 
52  if (null === $defaultPlaceholderDescriptionObject) {
53  $defaultPlaceholderDescriptionObject = new ilDefaultPlaceholderDescription(
54  $language,
55  $userDefinedFieldPlaceHolderDescriptionObject
56  );
57  }
58  $this->placeholder = $defaultPlaceholderDescriptionObject->getPlaceholderDescriptions();
59 
60  $this->placeholder['RESULT_PASSED'] = ilLegacyFormElementsUtil::prepareFormOutput(
61  $language->txt('certificate_var_result_passed')
62  );
63  $this->placeholder['RESULT_MARK'] = ilLegacyFormElementsUtil::prepareFormOutput(
64  $language->txt('certificate_var_result_mark_short')
65  );
66  $this->placeholder['EXERCISE_TITLE'] = ilLegacyFormElementsUtil::prepareFormOutput(
67  $language->txt('certificate_ph_exercisetitle')
68  );
69  $this->placeholder['DATE_COMPLETED'] = ilLegacyFormElementsUtil::prepareFormOutput(
70  $language->txt('certificate_ph_datetime_completed')
71  );
72  $this->placeholder['DATETIME_COMPLETED'] = ilLegacyFormElementsUtil::prepareFormOutput(
73  $language->txt('certificate_ph_datetime_completed')
74  );
75  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
loadLanguageModule(string $a_module)
Load language module.
static prepareFormOutput($a_str, bool $a_strip=false)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
global $DIC
Definition: shib_login.php:26
language()
description: > Example for rendring a language glyph.
Definition: language.php:41
+ Here is the call graph for this function:

Member Function Documentation

◆ createPlaceholderHtmlDescription()

ILIAS\Exercise\Certificate\ExercisePlaceholderDescription::createPlaceholderHtmlDescription ( ?ilTemplate  $template = null)

This methods MUST return an array containing an array with the the description as array value.

Returns
string - [PLACEHOLDER] => 'description'

Definition at line 82 of file ExercisePlaceholderDescription.php.

References $id, ILIAS\UI\examples\Symbol\Glyph\Language\language(), and null.

82  : string
83  {
84  if (null === $template) {
85  $template = new ilTemplate('tpl.default_description.html', true, true, 'components/ILIAS/Certificate');
86  }
87 
88  $template->setVariable('PLACEHOLDER_INTRODUCTION', $this->language->txt('certificate_ph_introduction'));
89 
90  $template->setCurrentBlock('items');
91  foreach ($this->placeholder as $id => $caption) {
92  $template->setVariable('ID', $id);
93  $template->setVariable('TXT', $caption);
94  $template->parseCurrentBlock();
95  }
96 
97  return $template->get();
98  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
language()
description: > Example for rendring a language glyph.
Definition: language.php:41
+ Here is the call graph for this function:

◆ getPlaceholderDescriptions()

ILIAS\Exercise\Certificate\ExercisePlaceholderDescription::getPlaceholderDescriptions ( )

This method MUST return an array containing an array with the description as array value.

Returns
array - [PLACEHOLDER] => 'description'

Implements ilCertificatePlaceholderDescription.

Definition at line 105 of file ExercisePlaceholderDescription.php.

References ILIAS\Exercise\Certificate\ExercisePlaceholderDescription\$placeholder.

Field Documentation

◆ $defaultPlaceHolderDescriptionObject

readonly ilDefaultPlaceholderDescription ILIAS\Exercise\Certificate\ExercisePlaceholderDescription::$defaultPlaceHolderDescriptionObject
private

Definition at line 35 of file ExercisePlaceholderDescription.php.

◆ $language

readonly ilLanguage ILIAS\Exercise\Certificate\ExercisePlaceholderDescription::$language
private

◆ $placeholder

array ILIAS\Exercise\Certificate\ExercisePlaceholderDescription::$placeholder
private

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