65 $language->loadLanguageModule(
'certificate');
69 if (
null === $defaultPlaceholderValues) {
88 $this->defaultPlaceholderValuesObject = $defaultPlaceholderValues;
100 $this->defaultPlaceholderValuesObject = $defaultPlaceholderValues;
110 $possibleDate !==
false &&
111 $possibleDate !==
null &&
129 $courseObject = $this->objectHelper->getInstanceByObjId(
$objId);
131 $placeholders = $this->defaultPlaceholderValuesObject->getPlaceholderValues($userId,
$objId);
133 $placeholders[
'COURSE_TITLE'] = $this->ilUtilHelper->prepareFormOutput($courseObject->getTitle());
134 $completionDate = $this->participantsHelper->getDateTimeOfPassed(
$objId, $userId);
136 $completionDate = $this->lpStatusHelper->lookupStatusChanged(
$objId, $userId);
140 $placeholders[
'DATE_COMPLETED'] = $this->dateHelper->formatDate($completionDate);
141 $placeholders[
'DATETIME_COMPLETED'] = $this->dateHelper->formatDateTime($completionDate);
144 $placeholders[
'COURSE_TITLE'] = $this->ilUtilHelper->prepareFormOutput($courseObject->getTitle());
146 return $placeholders;
159 $placeholders = $this->defaultPlaceholderValuesObject->getPlaceholderValuesForPreview($userId,
$objId);
161 $object = $this->objectHelper->getInstanceByObjId(
$objId);
165 return $placeholders;
An exception for terminatinating execution or to throw for unit testing.
Just a wrapper class to create Unit Test for other classes.
getPlaceholderValuesForPreview(int $userId, int $objId)
This method is different then the 'getPlaceholderValues' method, this method is used to create a plac...
__construct(ilDefaultPlaceholderValues $defaultPlaceholderValues=null, ilLanguage $language=null, ilCertificateObjectHelper $objectHelper=null, ilCertificateParticipantsHelper $participantsHelper=null, ilCertificateUtilHelper $ilUtilHelper=null, ilCertificateDateHelper $dateHelper=null, ilCertificateLPStatusHelper $lpStatusHelper=null)
getPlaceholderValues(int $userId, int $objId)
This method MUST return an array that contains the actual data for the given user of the given object...
$defaultPlaceholderValuesObject
hasCompletionDate($possibleDate)
Collection of basic placeholder values that can be used.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public