ILIAS  release_7 Revision v7.30-3-g800a261c036
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 ()
 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

Definition at line 14 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 36 of file class.ilCmiXapiPlaceholderDescription.php.

40 {
41 global $DIC;
42
43 if (null === $language) {
44 $language = $DIC->language();
45 $language->loadLanguageModule('certificate');
46 }
47 $this->language = $language;
48
49 if (null === $defaultPlaceholderDescriptionObject) {
50 $defaultPlaceholderDescriptionObject = new ilDefaultPlaceholderDescription($language, $userDefinedFieldPlaceHolderDescriptionObject);
51 }
52 $this->defaultPlaceHolderDescriptionObject = $defaultPlaceholderDescriptionObject;
53
54 $this->placeholder = $this->defaultPlaceHolderDescriptionObject->getPlaceholderDescriptions();
55
56 $this->placeholder['OBJECT_TITLE'] = ilUtil::prepareFormOutput($this->language->txt('cmix_cert_ph_object_title'));
57 $this->placeholder['OBJECT_DESCRIPTION'] = ilUtil::prepareFormOutput($this->language->txt('cmix_cert_ph_object_description'));
58 $this->placeholder['REACHED_SCORE'] = ilUtil::prepareFormOutput($this->language->txt('cmix_cert_ph_reached_score'));
59 }
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()

ilCmiXapiPlaceholderDescription::createPlaceholderHtmlDescription ( ilTemplate  $template = null)

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

66 : string
67 {
68 if (null === $template) {
69 $template = new ilTemplate('tpl.default_description.html', true, true, 'Services/Certificate');
70 }
71
72 $template->setVariable('PLACEHOLDER_INTRODUCTION', $this->language->txt('certificate_ph_introduction'));
73
74 $template->setCurrentBlock('items');
75 foreach ($this->placeholder as $id => $caption) {
76 $template->setVariable('ID', $id);
77 $template->setVariable('TXT', $caption);
78 $template->parseCurrentBlock();
79 }
80
81 return $template->get();
82 }
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()

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

References $placeholder.

Field Documentation

◆ $defaultPlaceHolderDescriptionObject

ilCmiXapiPlaceholderDescription::$defaultPlaceHolderDescriptionObject
private

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

◆ $language

ilCmiXapiPlaceholderDescription::$language
private

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

Referenced by __construct().

◆ $placeholder

ilCmiXapiPlaceholderDescription::$placeholder
private

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