ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilStudyProgrammePlaceholderDescription Class Reference
+ Inheritance diagram for ilStudyProgrammePlaceholderDescription:
+ Collaboration diagram for 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

ilDefaultPlaceholderDescription $defaultPlaceHolderDescriptionObject
 
ilLanguage $language
 
array $placeholder
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilStudyProgrammePlaceholderDescription::__construct ( ?ilDefaultPlaceholderDescription  $defaultPlaceholderDescriptionObject = null,
?ilLanguage  $language = null,
?ilUserDefinedFieldsPlaceholderDescription  $userDefinedFieldPlaceHolderDescriptionObject = null 
)

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

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

31  {
32  global $DIC;
33 
34  if (null === $language) {
35  $language = $DIC->language();
36  $language->loadLanguageModule('certificate');
37  }
38  $this->language = $language;
39 
40  if (null === $defaultPlaceholderDescriptionObject) {
41  $defaultPlaceholderDescriptionObject = new ilDefaultPlaceholderDescription(
42  $language,
43  $userDefinedFieldPlaceHolderDescriptionObject
44  );
45  }
46  $this->defaultPlaceHolderDescriptionObject = $defaultPlaceholderDescriptionObject;
47 
48  $this->placeholder = $this->defaultPlaceHolderDescriptionObject->getPlaceholderDescriptions();
49  $this->placeholder['PRG_TITLE'] = $this->language->txt('sp_certificate_title');
50  $this->placeholder['PRG_DESCRIPTION'] = $this->language->txt('sp_certificate_description');
51  $this->placeholder['PRG_TYPE'] = $this->language->txt('sp_certificate_type');
52  $this->placeholder['PRG_POINTS'] = $this->language->txt('sp_certificate_points');
53  $this->placeholder['PRG_COMPLETION_DATE'] = $this->language->txt('sp_certificate_completion_date');
54  $this->placeholder['PRG_EXPIRES_AT'] = $this->language->txt('sp_certificate_progress_expires_at');
55  }
loadLanguageModule(string $a_module)
Load language module.
global $DIC
Definition: feed.php:28
Collection of basic placeholder values that can be used.
+ Here is the call graph for this function:

Member Function Documentation

◆ createPlaceholderHtmlDescription()

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

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

Parameters
ilTemplate | null$template
Returns
string - [PLACEHOLDER] => 'description'

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

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

63  : string
64  {
65  if (null === $template) {
66  $template = new ilTemplate('tpl.default_description.html', true, true, 'Services/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  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:

◆ getPlaceholderDescriptions()

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 $placeholder.

Field Documentation

◆ $defaultPlaceHolderDescriptionObject

ilDefaultPlaceholderDescription ilStudyProgrammePlaceholderDescription::$defaultPlaceHolderDescriptionObject
private

◆ $language

ilLanguage ilStudyProgrammePlaceholderDescription::$language
private

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

Referenced by __construct().

◆ $placeholder

array ilStudyProgrammePlaceholderDescription::$placeholder
private

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