ILIAS  release_7 Revision v7.30-3-g800a261c036
ilLTIConsumerPlaceholderDescription Class Reference
+ Inheritance diagram for ilLTIConsumerPlaceholderDescription:
+ Collaboration diagram for ilLTIConsumerPlaceholderDescription:

Public Member Functions

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

Private Attributes

 $defaultPlaceHolderDescriptionObject
 
 $language
 
 $placeholder
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 35 of file class.ilLTIConsumerPlaceholderDescription.php.

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

39  {
40  global $DIC;
41 
42  if (null === $language) {
43  $language = $DIC->language();
44  $language->loadLanguageModule('certificate');
45  }
46  $this->language = $language;
47 
48  if (null === $defaultPlaceholderDescriptionObject) {
49  $defaultPlaceholderDescriptionObject = new ilDefaultPlaceholderDescription($language, $userDefinedFieldPlaceHolderDescriptionObject);
50  }
51  $this->defaultPlaceHolderDescriptionObject = $defaultPlaceholderDescriptionObject;
52 
53  $this->placeholder = $this->defaultPlaceHolderDescriptionObject->getPlaceholderDescriptions();
54  $this->placeholder['OBJECT_TITLE'] = ilUtil::prepareFormOutput($this->language->txt('lti_cert_ph_object_title'));
55  $this->placeholder['OBJECT_DESCRIPTION'] = ilUtil::prepareFormOutput($this->language->txt('lti_cert_ph_object_description'));
56  $this->placeholder['MASTERY_SCORE'] = ilUtil::prepareFormOutput($this->language->txt('lti_cert_ph_mastery_score'));
57  $this->placeholder['REACHED_SCORE'] = ilUtil::prepareFormOutput($this->language->txt('lti_cert_ph_reached_score'));
58  $this->placeholder['DATE_COMPLETED'] = ilUtil::prepareFormOutput($language->txt('certificate_ph_date_completed'));
59  $this->placeholder['DATETIME_COMPLETED'] = ilUtil::prepareFormOutput($language->txt('certificate_ph_datetime_completed'));
60  }
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()

ilLTIConsumerPlaceholderDescription::createPlaceholderHtmlDescription ( ilTemplate  $template = null)

Definition at line 67 of file class.ilLTIConsumerPlaceholderDescription.php.

References language().

67  : string
68  {
69  if (null === $template) {
70  $template = new ilTemplate('tpl.default_description.html', true, true, 'Services/Certificate');
71  }
72 
73  $template->setVariable('PLACEHOLDER_INTRODUCTION', $this->language->txt('certificate_ph_introduction'));
74 
75  $template->setCurrentBlock('items');
76  foreach ($this->placeholder as $id => $caption) {
77  $template->setVariable('ID', $id);
78  $template->setVariable('TXT', $caption);
79  $template->parseCurrentBlock();
80  }
81 
82  return $template->get();
83  }
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()

ilLTIConsumerPlaceholderDescription::getPlaceholderDescriptions ( )

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

Returns
array<string, string> A [PLACEHOLDER] => 'description' map

Implements ilCertificatePlaceholderDescription.

Definition at line 62 of file class.ilLTIConsumerPlaceholderDescription.php.

References $placeholder.

Field Documentation

◆ $defaultPlaceHolderDescriptionObject

ilLTIConsumerPlaceholderDescription::$defaultPlaceHolderDescriptionObject
private

◆ $language

ilLTIConsumerPlaceholderDescription::$language
private

Definition at line 23 of file class.ilLTIConsumerPlaceholderDescription.php.

Referenced by __construct().

◆ $placeholder

ilLTIConsumerPlaceholderDescription::$placeholder
private

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