19 declare(strict_types=1);
    33         if (null === $language) {
    35             $language = $DIC->language();
    36             $language->loadLanguageModule(
'certificate');
    39         if (null === $defaultPlaceholderValues) {
    40             $defaultPlaceholderValues = new \ilDefaultPlaceholderValues();
    43         if (null === $objectHelper) {
    44             $objectHelper = new \ilCertificateObjectHelper();
    48         $this->defaultPlaceholderValuesObject = $defaultPlaceholderValues;
    63         $object = $this->objectHelper->getInstanceByObjId($objId);
    64         $placeholders = $this->defaultPlaceholderValuesObject->getPlaceholderValues($userId, $objId);
    66         $latest_progress = 
false;
    67         $ass_id = $object->getCertificateRelevantAssignmentIds($userId);
    69             $latest_progress = $object->getSpecificAssignment(current(
$ass_id))->getProgressTree();
    72         $type = $object->getSubType();
    77             $latest_progress ? (
string) $latest_progress->getCurrentAmountOfPoints() : 
''    80             $latest_progress && $latest_progress->getCompletionDate() instanceof \DateTimeImmutable ? $latest_progress->getCompletionDate(
    81             )->format(
'd.m.Y') : 
''    84             $latest_progress && $latest_progress->getValidityOfQualification(
    85             ) instanceof \DateTimeImmutable ? $latest_progress->getValidityOfQualification()->format(
'd.m.Y') : 
''    97         $placeholders = $this->defaultPlaceholderValuesObject->getPlaceholderValuesForPreview($userId, $objId);
    99         $object = $this->objectHelper->getInstanceByObjId($objId);
   100         $type = $object->getSubType();
   106         $placeholders[
'PRG_COMPLETION_DATE'] = $today;
   107         $placeholders[
'PRG_EXPIRES_AT'] = $today;
   108         return $placeholders;
 
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 ilDefaultPlaceholderValues $defaultPlaceholderValuesObject
 
readonly ilCertificateObjectHelper $objectHelper
 
__construct(?\ilDefaultPlaceholderValues $defaultPlaceholderValues=null, ?\ilLanguage $language=null, ?\ilCertificateObjectHelper $objectHelper=null)
 
getPlaceholderValuesForPreview(int $userId, int $objId)
This method is different then the 'getPlaceholderValues' method, this method is used to create a plac...