ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 ()
 
 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

ilDefaultPlaceholderDescription $defaultPlaceHolderDescriptionObject
 
ilLanguage $language
 
array $placeholder
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

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

41 {
42 global $DIC;
43
44 if (null === $language) {
45 $language = $DIC->language();
46 $language->loadLanguageModule('certificate');
47 }
48 $this->language = $language;
49
50 if (null === $defaultPlaceholderDescriptionObject) {
51 $defaultPlaceholderDescriptionObject = new ilDefaultPlaceholderDescription($language, $userDefinedFieldPlaceHolderDescriptionObject);
52 }
53 $this->defaultPlaceHolderDescriptionObject = $defaultPlaceholderDescriptionObject;
54
55 $this->placeholder = $this->defaultPlaceHolderDescriptionObject->getPlaceholderDescriptions();
56 $this->placeholder['OBJECT_TITLE'] = ilLegacyFormElementsUtil::prepareFormOutput(
57 $this->language->txt('lti_cert_ph_object_title')
58 );
59 $this->placeholder['OBJECT_DESCRIPTION'] = ilLegacyFormElementsUtil::prepareFormOutput(
60 $this->language->txt('lti_cert_ph_object_description')
61 );
62 $this->placeholder['MASTERY_SCORE'] = ilLegacyFormElementsUtil::prepareFormOutput(
63 $this->language->txt('lti_cert_ph_mastery_score')
64 );
65 $this->placeholder['REACHED_SCORE'] = ilLegacyFormElementsUtil::prepareFormOutput(
66 $this->language->txt('lti_cert_ph_reached_score')
67 );
68 $this->placeholder['DATE_COMPLETED'] = ilLegacyFormElementsUtil::prepareFormOutput(
69 $language->txt('certificate_ph_date_completed')
70 );
71 $this->placeholder['DATETIME_COMPLETED'] = ilLegacyFormElementsUtil::prepareFormOutput(
72 $language->txt('certificate_ph_datetime_completed')
73 );
74 }
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: shib_login.php:26

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()

ilLTIConsumerPlaceholderDescription::createPlaceholderHtmlDescription ( ilTemplate  $template = null)

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

84 : string
85 {
86 if (null === $template) {
87 $template = new ilTemplate('tpl.default_description.html', true, true, 'components/ILIAS/Certificate');
88 }
89
90 $template->setVariable('PLACEHOLDER_INTRODUCTION', $this->language->txt('certificate_ph_introduction'));
91
92 $template->setCurrentBlock('items');
93 foreach ($this->placeholder as $id => $caption) {
94 $template->setVariable('ID', $id);
95 $template->setVariable('TXT', $caption);
96 $template->parseCurrentBlock();
97 }
98
99 return $template->get();
100 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:544
special template class to simplify handling of ITX/PEAR
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
get(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
Returns a block with all replacements done.
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)

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

+ Here is the call graph for this function:

◆ getPlaceholderDescriptions()

ilLTIConsumerPlaceholderDescription::getPlaceholderDescriptions ( )

Field Documentation

◆ $defaultPlaceHolderDescriptionObject

ilDefaultPlaceholderDescription ilLTIConsumerPlaceholderDescription::$defaultPlaceHolderDescriptionObject
private

◆ $language

ilLanguage ilLTIConsumerPlaceholderDescription::$language
private

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

Referenced by __construct().

◆ $placeholder

array ilLTIConsumerPlaceholderDescription::$placeholder
private

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