ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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

 $defaultPlaceHolderDescriptionObject
 
 $language
 
 $placeholder
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

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

References $DIC, $language, and language().

30  {
31  global $DIC;
32 
33  if (null === $language) {
34  $language = $DIC->language();
35  $language->loadLanguageModule('certificate');
36  }
37  $this->language = $language;
38 
39  if (null === $defaultPlaceholderDescriptionObject) {
40  $defaultPlaceholderDescriptionObject = new ilDefaultPlaceholderDescription($language, $userDefinedFieldPlaceHolderDescriptionObject);
41  }
42  $this->defaultPlaceHolderDescriptionObject = $defaultPlaceholderDescriptionObject;
43 
44  $this->placeholder = $this->defaultPlaceHolderDescriptionObject->getPlaceholderDescriptions();
45  $this->placeholder['PRG_TITLE'] = $this->language->txt('sp_certificate_title');
46  $this->placeholder['PRG_DESCRIPTION'] = $this->language->txt('sp_certificate_description');
47  $this->placeholder['PRG_TYPE'] = $this->language->txt('sp_certificate_type');
48  $this->placeholder['PRG_POINTS'] = $this->language->txt('sp_certificate_points');
49  $this->placeholder['PRG_COMPLETION_DATE'] = $this->language->txt('sp_certificate_completion_date');
50  $this->placeholder['PRG_EXPIRES_AT'] = $this->language->txt('sp_certificate_progress_expires_at');
51  }
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()

ilStudyProgrammePlaceholderDescription::createPlaceholderHtmlDescription ( ilTemplate  $template = null)

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

Parameters
null$template
Returns
mixed - [PLACEHOLDER] => 'description'

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

References language().

61  : string
62  {
63  if (null === $template) {
64  $template = new ilTemplate('tpl.default_description.html', true, true, 'Services/Certificate');
65  }
66 
67  $template->setVariable("PLACEHOLDER_INTRODUCTION", $this->language->txt('certificate_ph_introduction'));
68 
69  $template->setCurrentBlock("items");
70  foreach ($this->placeholder as $id => $caption) {
71  $template->setVariable("ID", $id);
72  $template->setVariable("TXT", $caption);
73  $template->parseCurrentBlock();
74  }
75 
76  return $template->get();
77  }
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()

ilStudyProgrammePlaceholderDescription::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 85 of file class.ilStudyProgrammePlaceholderDescription.php.

References $placeholder.

Field Documentation

◆ $defaultPlaceHolderDescriptionObject

ilStudyProgrammePlaceholderDescription::$defaultPlaceHolderDescriptionObject
private

◆ $language

ilStudyProgrammePlaceholderDescription::$language
private

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

Referenced by __construct().

◆ $placeholder

ilStudyProgrammePlaceholderDescription::$placeholder
private

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