ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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, ?\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
 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,
?\ilUserDefinedFieldsPlaceholderDescription  $userDefinedFieldPlaceHolderDescriptionObject = null 
)

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

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

33  {
34  global $DIC;
35 
36  if (null === $language) {
37  $language = $DIC->language();
38  $language->loadLanguageModule('certificate');
39  }
40  $this->language = $language;
41 
42  if (null === $defaultPlaceholderDescriptionObject) {
43  $defaultPlaceholderDescriptionObject = new \ilDefaultPlaceholderDescription(
44  $language,
45  $userDefinedFieldPlaceHolderDescriptionObject
46  );
47  }
48  $this->defaultPlaceHolderDescriptionObject = $defaultPlaceholderDescriptionObject;
49 
50  $this->placeholder = $this->defaultPlaceHolderDescriptionObject->getPlaceholderDescriptions();
51  $this->placeholder['PRG_TITLE'] = $this->language->txt('sp_certificate_title');
52  $this->placeholder['PRG_DESCRIPTION'] = $this->language->txt('sp_certificate_description');
53  $this->placeholder['PRG_TYPE'] = $this->language->txt('sp_certificate_type');
54  $this->placeholder['PRG_POINTS'] = $this->language->txt('sp_certificate_points');
55  $this->placeholder['PRG_COMPLETION_DATE'] = $this->language->txt('sp_certificate_completion_date');
56  $this->placeholder['PRG_EXPIRES_AT'] = $this->language->txt('sp_certificate_progress_expires_at');
57  }
loadLanguageModule(string $a_module)
Load language module.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
global $DIC
Definition: shib_login.php:22
language()
description: > Example for rendring a language glyph.
Definition: language.php:41
+ 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 63 of file class.ilStudyProgrammePlaceholderDescription.php.

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

63  : string
64  {
65  if (null === $template) {
66  $template = new \ilTemplate('tpl.default_description.html', true, true, 'components/ILIAS/Certificate');
67  }
68 
69  $template->setVariable("PLACEHOLDER_INTRODUCTION", $this->language->txt('certificate_ph_introduction'));
70 
71  $template->setCurrentBlock("items");
72  foreach ($this->placeholder as $id => $caption) {
73  $template->setVariable("ID", $id);
74  $template->setVariable("TXT", $caption);
75  $template->parseCurrentBlock();
76  }
77 
78  return $template->get();
79  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
language()
description: > Example for rendring a language glyph.
Definition: language.php:41
+ 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 86 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: