ILIAS  release_7 Revision v7.30-3-g800a261c036
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
 createPlaceholderHtmlDescription ()
 

Private Attributes

 $defaultPlaceHolderDescriptionObject
 
 $language
 
 $placeholder
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

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

References $DIC, $language, language(), and ilUtil\prepareFormOutput().

33  {
34  global $DIC;
35 
36  if (null === $language) {
37  $language = $DIC->language();
38  $language->loadLanguageModule('certificate');
39  }
40  $this->language = $language;
41 
42  if (null === $defaultPlaceholderDescriptionObject) {
43  $defaultPlaceholderDescriptionObject = new ilDefaultPlaceholderDescription($language, $userDefinedFieldPlaceHolderDescriptionObject);
44  }
45  $this->defaultPlaceHolderDescriptionObject = $defaultPlaceholderDescriptionObject;
46 
47  $this->placeholder = $this->defaultPlaceHolderDescriptionObject->getPlaceholderDescriptions();
48 
49  $this->placeholder['RESULT_PASSED'] = ilUtil::prepareFormOutput($language->txt('certificate_var_result_passed'));
50  $this->placeholder['RESULT_MARK'] = ilUtil::prepareFormOutput($language->txt('certificate_var_result_mark_short'));
51  $this->placeholder['EXERCISE_TITLE'] = ilUtil::prepareFormOutput($language->txt('certificate_ph_exercisetitle'));
52  $this->placeholder['DATE_COMPLETED'] = ilUtil::prepareFormOutput($language->txt('certificate_ph_datetime_completed'));
53  $this->placeholder['DATETIME_COMPLETED'] = ilUtil::prepareFormOutput($language->txt('certificate_ph_datetime_completed'));
54  }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
getPlaceholderDescriptions()
This method MUST return an array containing an array with the the description as array value...
global $DIC
Definition: goto.php:24
loadLanguageModule($a_module)
Collection of basic placeholder values that can be used.
language()
Definition: language.php:2
txt($a_topic, $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...
+ 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$template
Returns
mixed - [PLACEHOLDER] => 'description'

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

References language().

64  : string
65  {
66  if (null === $template) {
67  $template = new ilTemplate('tpl.default_description.html', true, true, 'Services/Certificate');
68  }
69 
70  $template->setVariable('PLACEHOLDER_INTRODUCTION', $this->language->txt('certificate_ph_introduction'));
71 
72  $template->setCurrentBlock('items');
73  foreach ($this->placeholder as $id => $caption) {
74  $template->setVariable('ID', $id);
75  $template->setVariable('TXT', $caption);
76  $template->parseCurrentBlock();
77  }
78 
79  return $template->get();
80  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:615
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
language()
Definition: language.php:2
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
get($part="DEFAULT")
+ 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
mixed - [PLACEHOLDER] => 'description'

Implements ilCertificatePlaceholderDescription.

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

References $placeholder.

Field Documentation

◆ $defaultPlaceHolderDescriptionObject

ilExercisePlaceholderDescription::$defaultPlaceHolderDescriptionObject
private

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

◆ $language

ilExercisePlaceholderDescription::$language
private

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

Referenced by __construct().

◆ $placeholder

ilExercisePlaceholderDescription::$placeholder
private

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