ILIAS  release_8 Revision v8.24
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
50 if (null === $language) {
51 $language = $DIC->language();
52 $language->loadLanguageModule('certificate');
53 }
54 $this->language = $language;
55
56 if (null === $defaultPlaceholderDescriptionObject) {
57 $defaultPlaceholderDescriptionObject = new ilDefaultPlaceholderDescription($language, $userDefinedFieldPlaceHolderDescriptionObject);
58 }
59 $this->defaultPlaceHolderDescriptionObject = $defaultPlaceholderDescriptionObject;
60
61 $this->placeholder = $this->defaultPlaceHolderDescriptionObject->getPlaceholderDescriptions();
62
63 $this->placeholder['OBJECT_TITLE'] = ilLegacyFormElementsUtil::prepareFormOutput(
64 $this->language->txt('cmix_cert_ph_object_title')
65 );
66 $this->placeholder['OBJECT_DESCRIPTION'] = ilLegacyFormElementsUtil::prepareFormOutput(
67 $this->language->txt('cmix_cert_ph_object_description')
68 );
69 $this->placeholder['REACHED_SCORE'] = ilLegacyFormElementsUtil::prepareFormOutput(
70 $this->language->txt('cmix_cert_ph_reached_score')
71 );
72 }
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.
loadLanguageModule(string $a_module)
Load language module.
static prepareFormOutput($a_str, bool $a_strip=false)
global $DIC
Definition: feed.php:28

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 82 of file class.ilCmiXapiPlaceholderDescription.php.

82 : string
83 {
84 if (null === $template) {
85 $template = new ilTemplate('tpl.default_description.html', true, true, 'Services/Certificate');
86 }
87
88 $template->setVariable('PLACEHOLDER_INTRODUCTION', $this->language->txt('certificate_ph_introduction'));
89
90 $template->setCurrentBlock('items');
91 foreach ($this->placeholder as $id => $caption) {
92 $template->setVariable('ID', $id);
93 $template->setVariable('TXT', $caption);
94 $template->parseCurrentBlock();
95 }
96
97 return $template->get();
98 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:514
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()

ilCmiXapiPlaceholderDescription::getPlaceholderDescriptions ( )
Returns
mixed[]

Implements ilCertificatePlaceholderDescription.

Definition at line 77 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: