ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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

array $placeholder
 
int $objectId
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjectCustomUserFieldsPlaceholderDescription::__construct ( int  $objectId)

Definition at line 26 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 57 of file class.ilObjectCustomUserFieldsPlaceholderDescription.php.

References ILIAS\LTI\ToolProvider\$key, and getPlaceholderDescriptions().

57  : string
58  {
59  $template = new ilTemplate(
60  'tpl.common_desc.html',
61  true,
62  true,
63  'Services/Certificate'
64  );
65 
66  foreach ($this->getPlaceholderDescriptions() as $key => $field) {
67  $template->setCurrentBlock('cert_field');
68  $template->setVariable('PH', $key);
69  $template->setVariable('PH_TXT', $field);
70  $template->parseCurrentBlock();
71  }
72 
73  return $template->get();
74  }
string $key
Consumer key/client ID value.
Definition: System.php:193
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 52 of file class.ilObjectCustomUserFieldsPlaceholderDescription.php.

References $placeholder.

Referenced by ilCoursePlaceholderDescription\__construct(), and createPlaceholderHtmlDescription().

+ Here is the caller graph for this function:

◆ initPlaceholders()

ilObjectCustomUserFieldsPlaceholderDescription::initPlaceholders ( )
private

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

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

Referenced by __construct().

34  : void
35  {
36  $courseDefinedFields = ilCourseDefinedFieldDefinition::_getFields($this->objectId);
37 
38  foreach ($courseDefinedFields as $field) {
39  $name = $field->getName();
40 
41  $placeholderText = '+' . str_replace(' ', '_', ilStr::strToUpper($name));
42 
43  $this->placeholder[$placeholderText] = $name;
44  }
45  }
static _getFields(int $a_container_id, $a_sort=self::IL_CDF_SORT_NAME)
Get all fields of a container.
if($format !==null) $name
Definition: metadata.php:247
static strToUpper(string $a_string)
Definition: class.ilStr.php:81
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $objectId

int ilObjectCustomUserFieldsPlaceholderDescription::$objectId
private

◆ $placeholder

array ilObjectCustomUserFieldsPlaceholderDescription::$placeholder
private

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