ILIAS  release_7 Revision v7.30-3-g800a261c036
ilObjectCustomUserFieldsPlaceholderDescription Class Reference
+ Inheritance diagram for ilObjectCustomUserFieldsPlaceholderDescription:
+ Collaboration diagram for ilObjectCustomUserFieldsPlaceholderDescription:

Public Member Functions

 __construct (int $objectId)
 
 getPlaceholderDescriptions ()
 This method MUST return an array containing an array with the the description as array value. More...
 
 createPlaceholderHtmlDescription ()
 

Private Member Functions

 initPlaceholders ()
 

Private Attributes

 $placeholder
 
 $objectId
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjectCustomUserFieldsPlaceholderDescription::__construct ( int  $objectId)
Parameters
int$objectId

Definition at line 20 of file class.ilObjectCustomUserFieldsPlaceholderDescription.php.

References $objectId, and initPlaceholders().

+ Here is the call graph for this function:

Member Function Documentation

◆ createPlaceholderHtmlDescription()

ilObjectCustomUserFieldsPlaceholderDescription::createPlaceholderHtmlDescription ( )
Returns
string - HTML that can used to be displayed in the GUI

Implements ilCertificatePlaceholderDescription.

Definition at line 55 of file class.ilObjectCustomUserFieldsPlaceholderDescription.php.

References getPlaceholderDescriptions().

55  : string
56  {
57  $template = new ilTemplate(
58  'tpl.common_desc.html',
59  true,
60  true,
61  'Services/Certificate'
62  );
63 
64  foreach ($this->getPlaceholderDescriptions() as $key => $field) {
65  $template->setCurrentBlock('cert_field');
66  $template->setVariable('PH', $key);
67  $template->setVariable('PH_TXT', $field);
68  $template->parseCurrentBlock();
69  }
70 
71  return $template->get();
72  }
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:

◆ getPlaceholderDescriptions()

ilObjectCustomUserFieldsPlaceholderDescription::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 47 of file class.ilObjectCustomUserFieldsPlaceholderDescription.php.

References $placeholder.

Referenced by createPlaceholderHtmlDescription().

+ Here is the caller graph for this function:

◆ initPlaceholders()

ilObjectCustomUserFieldsPlaceholderDescription::initPlaceholders ( )
private

Definition at line 28 of file class.ilObjectCustomUserFieldsPlaceholderDescription.php.

References $name, ilCourseDefinedFieldDefinition\_getFields(), and ilStr\strToUpper().

Referenced by __construct().

29  {
30  $courseDefinedFields = ilCourseDefinedFieldDefinition::_getFields($this->objectId);
31 
32  foreach ($courseDefinedFields as $field) {
33  $name = $field->getName();
34 
35  $placeholderText = '+' . str_replace(' ', '_', ilStr::strToUpper($name));
36 
37  $this->placeholder[$placeholderText] = $name;
38  }
39  }
if($format !==null) $name
Definition: metadata.php:230
static strToUpper($a_string)
Definition: class.ilStr.php:96
static _getFields($a_container_id, $a_sort=IL_CDF_SORT_NAME)
Get all fields of a container.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $objectId

ilObjectCustomUserFieldsPlaceholderDescription::$objectId
private

◆ $placeholder

ilObjectCustomUserFieldsPlaceholderDescription::$placeholder
private

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