ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\StudyProgramme\Certificate\ilStudyProgrammePlaceholderDescription Class Reference
+ Inheritance diagram for ILIAS\StudyProgramme\Certificate\ilStudyProgrammePlaceholderDescription:
+ Collaboration diagram for ILIAS\StudyProgramme\Certificate\ilStudyProgrammePlaceholderDescription:

Public Member Functions

 __construct (?\ilDefaultPlaceholderDescription $defaultPlaceholderDescriptionObject=null, ?\ilLanguage $language=null, ?Profile $profile=null, ?\ilUserDefinedFieldsPlaceholderDescription $userDefinedFieldPlaceHolderDescriptionObject=null)
 
 createPlaceholderHtmlDescription (?\ilTemplate $template=null)
 This methods MUST return an array containing an array with the the description as array value. More...
 
 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

readonly ilDefaultPlaceholderDescription $defaultPlaceHolderDescriptionObject
 
readonly ilLanguage $language
 
array $placeholder
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ILIAS\StudyProgramme\Certificate\ilStudyProgrammePlaceholderDescription::__construct ( ?\ilDefaultPlaceholderDescription  $defaultPlaceholderDescriptionObject = null,
?\ilLanguage  $language = null,
?Profile  $profile = null,
?\ilUserDefinedFieldsPlaceholderDescription  $userDefinedFieldPlaceHolderDescriptionObject = null 
)

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

36 {
37 global $DIC;
38
39 if (null === $language) {
40 $language = $DIC->language();
41 $language->loadLanguageModule('certificate');
42 }
43 $this->language = $language;
44
45 $profile ??= $DIC['user']->getProfile();
46
47 if (null === $defaultPlaceholderDescriptionObject) {
48 $defaultPlaceholderDescriptionObject = new \ilDefaultPlaceholderDescription(
50 $profile,
51 $userDefinedFieldPlaceHolderDescriptionObject
52 );
53 }
54 $this->defaultPlaceHolderDescriptionObject = $defaultPlaceholderDescriptionObject;
55
56 $this->placeholder = $this->defaultPlaceHolderDescriptionObject->getPlaceholderDescriptions();
57 $this->placeholder['PRG_TITLE'] = $this->language->txt('sp_certificate_title');
58 $this->placeholder['PRG_DESCRIPTION'] = $this->language->txt('sp_certificate_description');
59 $this->placeholder['PRG_TYPE'] = $this->language->txt('sp_certificate_type');
60 $this->placeholder['PRG_POINTS'] = $this->language->txt('sp_certificate_points');
61 $this->placeholder['PRG_COMPLETION_DATE'] = $this->language->txt('sp_certificate_completion_date');
62 $this->placeholder['PRG_EXPIRES_AT'] = $this->language->txt('sp_certificate_progress_expires_at');
63 }
loadLanguageModule(string $a_module)
Load language module.
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\StudyProgramme\Certificate\ilStudyProgrammePlaceholderDescription\$language, ILIAS\UI\examples\Symbol\Glyph\Language\language(), and ilLanguage\loadLanguageModule().

+ Here is the call graph for this function:

Member Function Documentation

◆ createPlaceholderHtmlDescription()

ILIAS\StudyProgramme\Certificate\ilStudyProgrammePlaceholderDescription::createPlaceholderHtmlDescription ( ?\ilTemplate  $template = null)

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

Definition at line 69 of file class.ilStudyProgrammePlaceholderDescription.php.

69 : string
70 {
71 if (null === $template) {
72 $template = new \ilTemplate('tpl.default_description.html', true, true, 'components/ILIAS/Certificate');
73 }
74
75 $template->setVariable("PLACEHOLDER_INTRODUCTION", $this->language->txt('certificate_ph_introduction'));
76
77 $template->setCurrentBlock("items");
78 foreach ($this->placeholder as $id => $caption) {
79 $template->setVariable("ID", $id);
80 $template->setVariable("TXT", $caption);
81 $template->parseCurrentBlock();
82 }
83
84 return $template->get();
85 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

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

+ Here is the call graph for this function:

◆ getPlaceholderDescriptions()

ILIAS\StudyProgramme\Certificate\ilStudyProgrammePlaceholderDescription::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 92 of file class.ilStudyProgrammePlaceholderDescription.php.

References ILIAS\StudyProgramme\Certificate\ilStudyProgrammePlaceholderDescription\$placeholder.

Field Documentation

◆ $defaultPlaceHolderDescriptionObject

readonly ilDefaultPlaceholderDescription ILIAS\StudyProgramme\Certificate\ilStudyProgrammePlaceholderDescription::$defaultPlaceHolderDescriptionObject
private

◆ $language

readonly ilLanguage ILIAS\StudyProgramme\Certificate\ilStudyProgrammePlaceholderDescription::$language
private

◆ $placeholder

array ILIAS\StudyProgramme\Certificate\ilStudyProgrammePlaceholderDescription::$placeholder
private

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