ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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, and ilUtil\prepareFormOutput().

33  {
34  global $DIC;
35 
36  if (null === $language) {
37  $language = $DIC->language();
38  }
39  $this->language = $language;
40 
41  if (null === $defaultPlaceholderDescriptionObject) {
42  $defaultPlaceholderDescriptionObject = new ilDefaultPlaceholderDescription($language, $userDefinedFieldPlaceHolderDescriptionObject);
43  }
44  $this->defaultPlaceHolderDescriptionObject = $defaultPlaceholderDescriptionObject;
45 
46  $this->placeholder = $this->defaultPlaceHolderDescriptionObject->getPlaceholderDescriptions();
47  $this->placeholder['COURSE_TITLE'] = $this->language->txt('crs_title');
48  $this->placeholder['DATE_COMPLETED'] = ilUtil::prepareFormOutput($language->txt('certificate_ph_date_completed'));
49  $this->placeholder['DATETIME_COMPLETED'] = ilUtil::prepareFormOutput($language->txt('certificate_ph_datetime_completed'));
50  }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
global $DIC
Definition: saml.php:7
getPlaceholderDescriptions()
This method MUST return an array containing an array with the the description as array value...
Collection of basic placeholder values that can be used.
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 60 of file class.ilCoursePlaceholderDescription.php.

References $id, and $template.

60  : string
61  {
62  if (null === $template) {
63  $template = new ilTemplate('tpl.default_description.html', true, true, 'Services/Certificate');
64  }
65 
66  $template->setVariable("PLACEHOLDER_INTRODUCTION", $this->language->txt('certificate_ph_introduction'));
67 
68  $template->setCurrentBlock("items");
69  foreach ($this->placeholder as $id => $caption) {
70  $template->setVariable("ID", $id);
71  $template->setVariable("TXT", $caption);
72  $template->parseCurrentBlock();
73  }
74 
75  return $template->get();
76  }
if(!array_key_exists('StateId', $_REQUEST)) $id
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:613
special template class to simplify handling of ITX/PEAR
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
get( $part="DEFAULT", $add_error_mess=false, $handle_referer=false, $add_ilias_footer=false, $add_standard_elements=false, $a_main_menu=true, $a_tabs=true)
??? public
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...

◆ 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 84 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: