ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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
 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.

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

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  }
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...
loadLanguageModule(string $a_module)
Load language module.
static prepareFormOutput($a_str, bool $a_strip=false)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
global $DIC
Definition: shib_login.php:22
language()
description: > Example for rendring a language glyph.
Definition: language.php:41
+ 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.

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

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  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
language()
description: > Example for rendring a language glyph.
Definition: language.php:41
+ Here is the call graph for this function:

◆ getPlaceholderDescriptions()

ilLTIConsumerPlaceholderDescription::getPlaceholderDescriptions ( )
Returns
mixed[]

Implements ilCertificatePlaceholderDescription.

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

References $placeholder.

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: