ILIAS  release_8 Revision v8.24
ilExercisePlaceholderDescription Class Reference
+ Inheritance diagram for ilExercisePlaceholderDescription:
+ Collaboration diagram for ilExercisePlaceholderDescription:

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 the description as array value. More...
 
- Public Member Functions inherited from ilCertificatePlaceholderDescription
 getPlaceholderDescriptions ()
 This method MUST return an array containing an array with the the description as array value. More...
 
 createPlaceholderHtmlDescription ()
 

Private Attributes

ilDefaultPlaceholderDescription $defaultPlaceHolderDescriptionObject
 
ilLanguage $language
 
array $placeholder
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilExercisePlaceholderDescription::__construct ( ?ilDefaultPlaceholderDescription  $defaultPlaceholderDescriptionObject = null,
?ilLanguage  $language = null,
?ilUserDefinedFieldsPlaceholderDescription  $userDefinedFieldPlaceHolderDescriptionObject = null 
)

Definition at line 30 of file class.ilExercisePlaceholderDescription.php.

34 {
35 global $DIC;
36
37 if (null === $language) {
38 $language = $DIC->language();
39 $language->loadLanguageModule('certificate');
40 }
41 $this->language = $language;
42
43 if (null === $defaultPlaceholderDescriptionObject) {
44 $defaultPlaceholderDescriptionObject = new ilDefaultPlaceholderDescription(
46 $userDefinedFieldPlaceHolderDescriptionObject
47 );
48 }
49 $this->defaultPlaceHolderDescriptionObject = $defaultPlaceholderDescriptionObject;
50
51 $this->placeholder = $this->defaultPlaceHolderDescriptionObject->getPlaceholderDescriptions();
52
53 $this->placeholder['RESULT_PASSED'] = ilLegacyFormElementsUtil::prepareFormOutput(
54 $language->txt('certificate_var_result_passed')
55 );
56 $this->placeholder['RESULT_MARK'] = ilLegacyFormElementsUtil::prepareFormOutput(
57 $language->txt('certificate_var_result_mark_short')
58 );
59 $this->placeholder['EXERCISE_TITLE'] = ilLegacyFormElementsUtil::prepareFormOutput(
60 $language->txt('certificate_ph_exercisetitle')
61 );
62 $this->placeholder['DATE_COMPLETED'] = ilLegacyFormElementsUtil::prepareFormOutput(
63 $language->txt('certificate_ph_datetime_completed')
64 );
65 $this->placeholder['DATETIME_COMPLETED'] = ilLegacyFormElementsUtil::prepareFormOutput(
66 $language->txt('certificate_ph_datetime_completed')
67 );
68 }
Collection of basic placeholder values that can be used.
loadLanguageModule(string $a_module)
Load language module.
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...
static prepareFormOutput($a_str, bool $a_strip=false)
global $DIC
Definition: feed.php:28

References $DIC, $language, ILIAS\UI\examples\Symbol\Glyph\Language\language(), ilLanguage\loadLanguageModule(), ilLegacyFormElementsUtil\prepareFormOutput(), and ilLanguage\txt().

+ Here is the call graph for this function:

Member Function Documentation

◆ createPlaceholderHtmlDescription()

ilExercisePlaceholderDescription::createPlaceholderHtmlDescription ( ?ilTemplate  $template = null)

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

Parameters
ilTemplate | null$template
Returns
string - [PLACEHOLDER] => 'description'

Definition at line 76 of file class.ilExercisePlaceholderDescription.php.

76 : string
77 {
78 if (null === $template) {
79 $template = new ilTemplate('tpl.default_description.html', true, true, 'Services/Certificate');
80 }
81
82 $template->setVariable('PLACEHOLDER_INTRODUCTION', $this->language->txt('certificate_ph_introduction'));
83
84 $template->setCurrentBlock('items');
85 foreach ($this->placeholder as $id => $caption) {
86 $template->setVariable('ID', $id);
87 $template->setVariable('TXT', $caption);
88 $template->parseCurrentBlock();
89 }
90
91 return $template->get();
92 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
special template class to simplify handling of ITX/PEAR

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

+ Here is the call graph for this function:

◆ getPlaceholderDescriptions()

ilExercisePlaceholderDescription::getPlaceholderDescriptions ( )

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

Returns
array - [PLACEHOLDER] => 'description'

Implements ilCertificatePlaceholderDescription.

Definition at line 99 of file class.ilExercisePlaceholderDescription.php.

References $placeholder.

Field Documentation

◆ $defaultPlaceHolderDescriptionObject

ilDefaultPlaceholderDescription ilExercisePlaceholderDescription::$defaultPlaceHolderDescriptionObject
private

Definition at line 26 of file class.ilExercisePlaceholderDescription.php.

◆ $language

ilLanguage ilExercisePlaceholderDescription::$language
private

Definition at line 27 of file class.ilExercisePlaceholderDescription.php.

Referenced by __construct().

◆ $placeholder

array ilExercisePlaceholderDescription::$placeholder
private

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