ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
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
 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.

References $DIC, $language, language(), and ilUtil\prepareFormOutput().

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  }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
getPlaceholderDescriptions()
This method MUST return an array containing an array with the the description as array value...
loadLanguageModule($a_module)
$DIC
Definition: xapitoken.php:46
Collection of basic placeholder values that can be used.
language()
Definition: language.php:2
+ 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.

References language().

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='')
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
language()
Definition: language.php:2
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
get($part="DEFAULT")
+ 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
mixed - [PLACEHOLDER] => 'description'

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: