72 $language->loadLanguageModule(
'certificate');
76 if (null === $defaultPlaceholderValues) {
80 if (null === $customUserFieldsPlaceholderValues) {
109 $this->customUserFieldsPlaceholderValuesObject = $customUserFieldsPlaceholderValues;
110 $this->defaultPlaceholderValuesObject = $defaultPlaceholderValues;
120 $possibleDate !==
false &&
121 $possibleDate !== null &&
139 $courseObject = $this->objectHelper->getInstanceByObjId($objId);
141 $placeholders = $this->defaultPlaceholderValuesObject->getPlaceholderValues($userId, $objId);
143 $customUserFieldsPlaceholders = $this->customUserFieldsPlaceholderValuesObject->getPlaceholderValues($userId, $objId);
145 $placeholders = array_merge($placeholders, $customUserFieldsPlaceholders);
147 $completionDate = $this->participantsHelper->getDateTimeOfPassed($objId, $userId);
149 $completionDate = $this->lpStatusHelper->lookupStatusChanged($objId, $userId);
153 $placeholders[
'DATE_COMPLETED'] = $this->dateHelper->formatDate($completionDate);
154 $placeholders[
'DATETIME_COMPLETED'] = $this->dateHelper->formatDateTime($completionDate);
157 $placeholders[
'COURSE_TITLE'] = $this->ilUtilHelper->prepareFormOutput($courseObject->getTitle());
159 return $placeholders;
172 $placeholders = $this->defaultPlaceholderValuesObject->getPlaceholderValuesForPreview($userId, $objId);
174 $customUserFieldsPlaceholders = $this->customUserFieldsPlaceholderValuesObject->getPlaceholderValuesForPreview($userId, $objId);
176 $placeholders = array_merge($placeholders, $customUserFieldsPlaceholders);
178 $object = $this->objectHelper->getInstanceByObjId($objId);
182 return $placeholders;
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
Collection of basic placeholder values that can be used.
getPlaceholderValues(int $userId, int $objId)
This method MUST return an array that contains the actual data for the given user of the given object...
getPlaceholderValuesForPreview(int $userId, int $objId)
This method is different then the 'getPlaceholderValues' method, this method is used to create a plac...
$defaultPlaceholderValuesObject
__construct(ilObjectCustomUserFieldsPlaceholderValues $customUserFieldsPlaceholderValues=null, ilDefaultPlaceholderValues $defaultPlaceholderValues=null, ilLanguage $language=null, ilCertificateObjectHelper $objectHelper=null, ilCertificateParticipantsHelper $participantsHelper=null, ilCertificateUtilHelper $ilUtilHelper=null, ilCertificateDateHelper $dateHelper=null, ilCertificateLPStatusHelper $lpStatusHelper=null)
Just a wrapper class to create Unit Test for other classes.
$customUserFieldsPlaceholderValuesObject
hasCompletionDate($possibleDate)