ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilCmiXapiPlaceholderDescription Class Reference
+ Inheritance diagram for ilCmiXapiPlaceholderDescription:
+ Collaboration diagram for ilCmiXapiPlaceholderDescription:

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

Definition at line 30 of file class.ilCmiXapiPlaceholderDescription.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 43 of file class.ilCmiXapiPlaceholderDescription.php.

47 {
48 global $DIC;
49 $profile = $DIC['user']->getProfile();
50
51 if (null === $language) {
52 $language = $DIC->language();
53 $language->loadLanguageModule('certificate');
54 }
55 $this->language = $language;
56
57 if (null === $defaultPlaceholderDescriptionObject) {
58 $defaultPlaceholderDescriptionObject = new ilDefaultPlaceholderDescription($language, $profile, $userDefinedFieldPlaceHolderDescriptionObject);
59 }
60 $this->defaultPlaceHolderDescriptionObject = $defaultPlaceholderDescriptionObject;
61
62 $this->placeholder = $this->defaultPlaceHolderDescriptionObject->getPlaceholderDescriptions();
63
64 $this->placeholder['OBJECT_TITLE'] = ilLegacyFormElementsUtil::prepareFormOutput(
65 $this->language->txt('cmix_cert_ph_object_title')
66 );
67 $this->placeholder['OBJECT_DESCRIPTION'] = ilLegacyFormElementsUtil::prepareFormOutput(
68 $this->language->txt('cmix_cert_ph_object_description')
69 );
70 $this->placeholder['REACHED_SCORE'] = ilLegacyFormElementsUtil::prepareFormOutput(
71 $this->language->txt('cmix_cert_ph_reached_score')
72 );
73 }
Collection of basic placeholder values that can be used.
loadLanguageModule(string $a_module)
Load language module.
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(), and ilLegacyFormElementsUtil\prepareFormOutput().

+ Here is the call graph for this function:

Member Function Documentation

◆ createPlaceholderHtmlDescription()

ilCmiXapiPlaceholderDescription::createPlaceholderHtmlDescription ( ?ilTemplate  $template = null)

Definition at line 83 of file class.ilCmiXapiPlaceholderDescription.php.

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

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

+ Here is the call graph for this function:

◆ getPlaceholderDescriptions()

ilCmiXapiPlaceholderDescription::getPlaceholderDescriptions ( )
Returns
mixed[]

Implements ilCertificatePlaceholderDescription.

Definition at line 78 of file class.ilCmiXapiPlaceholderDescription.php.

References $placeholder.

Field Documentation

◆ $defaultPlaceHolderDescriptionObject

ilDefaultPlaceholderDescription ilCmiXapiPlaceholderDescription::$defaultPlaceHolderDescriptionObject
private

Definition at line 32 of file class.ilCmiXapiPlaceholderDescription.php.

◆ $language

ilLanguage ilCmiXapiPlaceholderDescription::$language
private

Definition at line 34 of file class.ilCmiXapiPlaceholderDescription.php.

Referenced by __construct().

◆ $placeholder

array ilCmiXapiPlaceholderDescription::$placeholder
private

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