ILIAS  release_8 Revision v8.24
ilCoursePlaceholderDescription Class Reference
+ Inheritance diagram for ilCoursePlaceholderDescription:
+ Collaboration diagram for ilCoursePlaceholderDescription:

Public Member Functions

 __construct (int $objectId, ?ilDefaultPlaceholderDescription $defaultPlaceholderDescriptionObject=null, ?ilLanguage $language=null, ?ilUserDefinedFieldsPlaceholderDescription $userDefinedFieldPlaceHolderDescriptionObject=null, ?ilObjectCustomUserFieldsPlaceholderDescription $customUserFieldsPlaceholderDescriptionObject=null)
 
 createPlaceholderHtmlDescription (?ilTemplate $template=null)
 
 getPlaceholderDescriptions ()
 This method MUST return an array containing an array with the the description as array value. More...
 
- 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
 
ilObjectCustomUserFieldsPlaceholderDescription $customUserFieldsPlaceholderDescriptionObject
 
ilLanguage $language
 
array $placeholder
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilCoursePlaceholderDescription::__construct ( int  $objectId,
?ilDefaultPlaceholderDescription  $defaultPlaceholderDescriptionObject = null,
?ilLanguage  $language = null,
?ilUserDefinedFieldsPlaceholderDescription  $userDefinedFieldPlaceHolderDescriptionObject = null,
?ilObjectCustomUserFieldsPlaceholderDescription  $customUserFieldsPlaceholderDescriptionObject = null 
)

Definition at line 31 of file class.ilCoursePlaceholderDescription.php.

37 {
38 global $DIC;
39
40 if (null === $language) {
41 $language = $DIC->language();
42 $language->loadLanguageModule('certificate');
43 }
44 $this->language = $language;
45
46 if (null === $defaultPlaceholderDescriptionObject) {
47 $defaultPlaceholderDescriptionObject = new ilDefaultPlaceholderDescription(
49 $userDefinedFieldPlaceHolderDescriptionObject
50 );
51 }
52 $this->defaultPlaceHolderDescriptionObject = $defaultPlaceholderDescriptionObject;
53
56 }
57 $this->customUserFieldsPlaceholderDescriptionObject = $customUserFieldsPlaceholderDescriptionObject;
58
59 $customUserFieldsPlaceholderHtmlDescription = $this->customUserFieldsPlaceholderDescriptionObject->getPlaceholderDescriptions();
60 $defaultPlaceholderDescription = $this->defaultPlaceHolderDescriptionObject->getPlaceholderDescriptions();
61
62 $this->placeholder = array_merge($defaultPlaceholderDescription, $customUserFieldsPlaceholderHtmlDescription);
63 $this->placeholder['COURSE_TITLE'] = $this->language->txt('crs_title');
64 $this->placeholder['DATE_COMPLETED'] = ilLegacyFormElementsUtil::prepareFormOutput(
65 $language->txt('certificate_ph_date_completed')
66 );
67 $this->placeholder['DATETIME_COMPLETED'] = ilLegacyFormElementsUtil::prepareFormOutput(
68 $language->txt('certificate_ph_datetime_completed')
69 );
70 }
ilObjectCustomUserFieldsPlaceholderDescription $customUserFieldsPlaceholderDescriptionObject
Collection of basic placeholder values that can be used.
loadLanguageModule(string $a_module)
Load language module.
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...
static prepareFormOutput($a_str, bool $a_strip=false)
getPlaceholderDescriptions()
This method MUST return an array containing an array with the the description as array value.
global $DIC
Definition: feed.php:28

References $customUserFieldsPlaceholderDescriptionObject, $DIC, $language, ilObjectCustomUserFieldsPlaceholderDescription\getPlaceholderDescriptions(), ILIAS\UI\examples\Symbol\Glyph\Language\language(), ilLanguage\loadLanguageModule(), ilLegacyFormElementsUtil\prepareFormOutput(), and ilLanguage\txt().

+ Here is the call graph for this function:

Member Function Documentation

◆ createPlaceholderHtmlDescription()

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

Definition at line 72 of file class.ilCoursePlaceholderDescription.php.

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

ilCoursePlaceholderDescription::getPlaceholderDescriptions ( )

This method MUST return an array containing an array with the the description as array value.

Returns
array - [PLACEHOLDER] => 'description'

Implements ilCertificatePlaceholderDescription.

Definition at line 95 of file class.ilCoursePlaceholderDescription.php.

References $placeholder.

Field Documentation

◆ $customUserFieldsPlaceholderDescriptionObject

ilObjectCustomUserFieldsPlaceholderDescription ilCoursePlaceholderDescription::$customUserFieldsPlaceholderDescriptionObject
private

Definition at line 27 of file class.ilCoursePlaceholderDescription.php.

Referenced by __construct().

◆ $defaultPlaceHolderDescriptionObject

ilDefaultPlaceholderDescription ilCoursePlaceholderDescription::$defaultPlaceHolderDescriptionObject
private

Definition at line 26 of file class.ilCoursePlaceholderDescription.php.

◆ $language

ilLanguage ilCoursePlaceholderDescription::$language
private

Definition at line 28 of file class.ilCoursePlaceholderDescription.php.

Referenced by __construct().

◆ $placeholder

array ilCoursePlaceholderDescription::$placeholder
private

Definition at line 29 of file class.ilCoursePlaceholderDescription.php.

Referenced by getPlaceholderDescriptions().


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