ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilDefaultPlaceholderDescription Class Reference

Collection of basic placeholder values that can be used. More...

+ Inheritance diagram for ilDefaultPlaceholderDescription:
+ Collaboration diagram for ilDefaultPlaceholderDescription:

Public Member Functions

 __construct (ilLanguage $language, ilUserDefinedFieldsPlaceholderDescription $userDefinedFieldPlaceHolderDescriptionObject=null)
 
 createPlaceholderHtmlDescription (ilTemplate $template=null)
 This method is different then the 'getPlaceholderValues' method, this method is used to create a placeholder value array containing dummy values that is used to create a preview certificate. 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

 $placeholder
 
 $language
 

Detailed Description

Collection of basic placeholder values that can be used.

Author
Niels Theen nthee.nosp@m.n@da.nosp@m.tabay.nosp@m..de

Definition at line 8 of file class.ilDefaultPlaceholderDescription.php.

Constructor & Destructor Documentation

◆ __construct()

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

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

References $language, and ilLanguage\txt().

25  {
26  if (null === $userDefinedFieldPlaceHolderDescriptionObject) {
27  $userDefinedFieldPlaceHolderDescriptionObject = new ilUserDefinedFieldsPlaceholderDescription();
28  }
29  $userDefinedPlaceholderHtmlDescription = $userDefinedFieldPlaceHolderDescriptionObject->getPlaceholderDescriptions();
30 
31  $this->language = $language;
32 
33  $this->placeholder = array(
34  'USER_LOGIN' => $language->txt('certificate_ph_login'),
35  'USER_FULLNAME' => $language->txt('certificate_ph_fullname'),
36  'USER_FIRSTNAME' => $language->txt('certificate_ph_firstname'),
37  'USER_LASTNAME' => $language->txt('certificate_ph_lastname'),
38  'USER_TITLE' => $language->txt('certificate_ph_title'),
39  'USER_SALUTATION' => $language->txt('certificate_ph_salutation'),
40  'USER_BIRTHDAY' => $language->txt('certificate_ph_birthday'),
41  'USER_INSTITUTION' => $language->txt('certificate_ph_institution'),
42  'USER_DEPARTMENT' => $language->txt('certificate_ph_department'),
43  'USER_STREET' => $language->txt('certificate_ph_street'),
44  'USER_CITY' => $language->txt('certificate_ph_city'),
45  'USER_ZIPCODE' => $language->txt('certificate_ph_zipcode'),
46  'USER_COUNTRY' => $language->txt('certificate_ph_country'),
47  'USER_MATRICULATION' => $language->txt('certificate_ph_matriculation'),
48  'DATE' => $language->txt("certificate_ph_date"),
49  'DATETIME' => $language->txt("certificate_ph_datetime"),
50  );
51 
52  $this->placeholder = array_merge($this->placeholder, $userDefinedPlaceholderHtmlDescription);
53  }
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...
getPlaceholderDescriptions()
This method MUST return an array containing an array with the the description as array value...
+ Here is the call graph for this function:

Member Function Documentation

◆ createPlaceholderHtmlDescription()

ilDefaultPlaceholderDescription::createPlaceholderHtmlDescription ( ilTemplate  $template = null)

This method is different then the 'getPlaceholderValues' method, this method is used to create a placeholder value array containing dummy values that is used to create a preview certificate.

Parameters
null$template
Returns
array|mixed

Definition at line 64 of file class.ilDefaultPlaceholderDescription.php.

References $id, and $template.

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

ilDefaultPlaceholderDescription::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 88 of file class.ilDefaultPlaceholderDescription.php.

References $placeholder.

Field Documentation

◆ $language

ilDefaultPlaceholderDescription::$language
private

Definition at line 18 of file class.ilDefaultPlaceholderDescription.php.

Referenced by __construct().

◆ $placeholder

ilDefaultPlaceholderDescription::$placeholder
private

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