19 declare(strict_types=1);
33 if (
null === $objectHelper) {
37 if (
null === $utilHelper) {
55 $user = $this->objectHelper->getInstanceByObjId($userId);
57 throw new ilException(
'The entered id: ' . $userId .
' is not an user object');
64 foreach ($course_defined_fields as $field) {
65 $field_id = $field->getId();
67 $placeholderText =
'+' . str_replace(
' ',
'_',
ilStr::strToUpper($field->getName()));
68 $placeholder[$placeholderText] =
69 !empty($field_values[$userId][$field_id]) ?
70 $this->utilHelper->prepareFormOutput(trim($field_values[$userId][$field_id])) :
86 $lng = $DIC->language();
91 foreach ($course_defined_fields as $field) {
92 $placeholderText =
'+' . str_replace(
' ',
'_',
ilStr::strToUpper($field->getName()));
static _getValuesByObjId(int $a_obj_id)
readonly ilCertificateUtilHelper $utilHelper
__construct(?ilCertificateObjectHelper $objectHelper=null, ?ilCertificateUtilHelper $utilHelper=null)
static _getFields(int $a_container_id, $a_sort=self::IL_CDF_SORT_NAME)
Get all fields of a container.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getPlaceholderValuesForPreview(int $userId, int $objId)
This method is different then the 'getPlaceholderValues' method, this method is used to create a plac...
static strToUpper(string $a_string)
getPlaceholderValues(int $userId, int $objId)
This method MUST return an array that contains the actual data for the given user of the given object...
readonly ilCertificateObjectHelper $objectHelper