19declare(strict_types=1);
45 $profile ??=
$DIC[
'user']->getProfile();
47 if (
null === $defaultPlaceholderDescriptionObject) {
48 $defaultPlaceholderDescriptionObject = new \ilDefaultPlaceholderDescription(
51 $userDefinedFieldPlaceHolderDescriptionObject
54 $this->defaultPlaceHolderDescriptionObject = $defaultPlaceholderDescriptionObject;
56 $this->placeholder = $this->defaultPlaceHolderDescriptionObject->getPlaceholderDescriptions();
57 $this->placeholder[
'PRG_TITLE'] = $this->
language->txt(
'sp_certificate_title');
58 $this->placeholder[
'PRG_DESCRIPTION'] = $this->
language->txt(
'sp_certificate_description');
59 $this->placeholder[
'PRG_TYPE'] = $this->
language->txt(
'sp_certificate_type');
60 $this->placeholder[
'PRG_POINTS'] = $this->
language->txt(
'sp_certificate_points');
61 $this->placeholder[
'PRG_COMPLETION_DATE'] = $this->
language->txt(
'sp_certificate_completion_date');
62 $this->placeholder[
'PRG_EXPIRES_AT'] = $this->
language->txt(
'sp_certificate_progress_expires_at');
71 if (
null === $template) {
72 $template = new \ilTemplate(
'tpl.default_description.html',
true,
true,
'components/ILIAS/Certificate');
75 $template->setVariable(
"PLACEHOLDER_INTRODUCTION", $this->
language->txt(
'certificate_ph_introduction'));
77 $template->setCurrentBlock(
"items");
78 foreach ($this->placeholder as
$id => $caption) {
79 $template->setVariable(
"ID",
$id);
80 $template->setVariable(
"TXT", $caption);
81 $template->parseCurrentBlock();
84 return $template->get();
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
readonly ilDefaultPlaceholderDescription $defaultPlaceHolderDescriptionObject
getPlaceholderDescriptions()
This method MUST return an array containing an array with the the description as array value.
readonly ilLanguage $language
__construct(?\ilDefaultPlaceholderDescription $defaultPlaceholderDescriptionObject=null, ?\ilLanguage $language=null, ?Profile $profile=null, ?\ilUserDefinedFieldsPlaceholderDescription $userDefinedFieldPlaceHolderDescriptionObject=null)
createPlaceholderHtmlDescription(?\ilTemplate $template=null)
This methods MUST return an array containing an array with the the description as array value.
Collection of basic placeholder values that can be used.
loadLanguageModule(string $a_module)
Load language module.
special template class to simplify handling of ITX/PEAR