19 declare(strict_types=1);
33 if (null === $objectHelper) {
37 if (null === $utilHelper) {
58 $user = $this->objectHelper->getInstanceByObjId($userId);
60 throw new ilException(
'The entered id: ' . $userId .
' is not an user object');
67 foreach ($course_defined_fields as
$key => $field) {
68 $field_id = $field->getId();
70 $placeholderText =
'+' . str_replace(
' ',
'_',
ilStr::strToUpper($field->getName()));
71 $placeholder[$placeholderText] =
72 !empty($field_values[$userId][$field_id]) ?
73 $this->utilHelper->prepareFormOutput(trim($field_values[$userId][$field_id])) :
92 $lng = $DIC->language();
97 foreach ($course_defined_fields as
$key => $field) {
98 $placeholderText =
'+' . str_replace(
' ',
'_',
ilStr::strToUpper($field->getName()));
static _getValuesByObjId(int $a_obj_id)
__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.
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)
ilCertificateObjectHelper $objectHelper
ilCertificateUtilHelper $utilHelper
Just a wrapper class to create Unit Test for other classes.
getPlaceholderValues(int $userId, int $objId)
This method MUST return an array that contains the actual data for the given user of the given object...