ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilCoursePlaceholderDescription Class Reference
+ Inheritance diagram for ilCoursePlaceholderDescription:
+ Collaboration diagram for ilCoursePlaceholderDescription:

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()

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

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

References $DIC, $language, language(), and ilUtil\prepareFormOutput().

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($language, $userDefinedFieldPlaceHolderDescriptionObject);
44  }
45  $this->defaultPlaceHolderDescriptionObject = $defaultPlaceholderDescriptionObject;
46 
47  $this->placeholder = $this->defaultPlaceHolderDescriptionObject->getPlaceholderDescriptions();
48  $this->placeholder['COURSE_TITLE'] = $this->language->txt('crs_title');
49  $this->placeholder['DATE_COMPLETED'] = ilUtil::prepareFormOutput($language->txt('certificate_ph_date_completed'));
50  $this->placeholder['DATETIME_COMPLETED'] = ilUtil::prepareFormOutput($language->txt('certificate_ph_datetime_completed'));
51  }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
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
txt($a_topic, $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...
+ Here is the call graph for this function:

Member Function Documentation

◆ createPlaceholderHtmlDescription()

ilCoursePlaceholderDescription::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 59 of file class.ilCoursePlaceholderDescription.php.

References language().

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

ilCoursePlaceholderDescription::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 82 of file class.ilCoursePlaceholderDescription.php.

References $placeholder.

Field Documentation

◆ $defaultPlaceHolderDescriptionObject

ilCoursePlaceholderDescription::$defaultPlaceHolderDescriptionObject
private

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

◆ $language

ilCoursePlaceholderDescription::$language
private

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

Referenced by __construct().

◆ $placeholder

ilCoursePlaceholderDescription::$placeholder
private

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

Referenced by getPlaceholderDescriptions().


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