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
 getPlaceholderDescriptions ()
 This method MUST return an array containing an array with the the description as array value. More...
 
 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.

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 }
Collection of basic placeholder values that can be used.
getPlaceholderDescriptions()
This method MUST return an array containing an array with the the description as array value.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
global $DIC
Definition: goto.php:24
language()
Definition: language.php:2

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

+ 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.

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
special template class to simplify handling of ITX/PEAR
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt @access public.
get($part="DEFAULT")
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.

References language().

+ 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: