19declare(strict_types=1);
58 if (
null === $defaultPlaceholderDescriptionObject) {
61 $profile ??
$DIC[
'user']->getProfile(),
62 $userDefinedFieldPlaceHolderDescriptionObject
65 $this->defaultPlaceHolderDescriptionObject = $defaultPlaceholderDescriptionObject;
72 $customUserFieldsPlaceholderHtmlDescription = $this->customUserFieldsPlaceholderDescriptionObject->
getPlaceholderDescriptions();
73 $defaultPlaceholderDescription = $this->defaultPlaceHolderDescriptionObject->getPlaceholderDescriptions();
75 $this->placeholder = array_merge($defaultPlaceholderDescription, $customUserFieldsPlaceholderHtmlDescription);
76 $this->placeholder[
'COURSE_TITLE'] = $this->
language->txt(
'crs_title');
87 if (
null === $template) {
88 $template =
new ilTemplate(
'tpl.default_description.html',
true,
true,
'components/ILIAS/Certificate');
91 $template->setVariable(
'PLACEHOLDER_INTRODUCTION', $this->
language->txt(
'certificate_ph_introduction'));
93 $template->setCurrentBlock(
'items');
94 foreach ($this->placeholder as
$id => $caption) {
95 $template->setVariable(
'ID',
$id);
96 $template->setVariable(
'TXT', $caption);
97 $template->parseCurrentBlock();
100 return $template->get();
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
__construct(int $objectId, ?ilDefaultPlaceholderDescription $defaultPlaceholderDescriptionObject=null, ?ilLanguage $language=null, ?ilUserDefinedFieldsPlaceholderDescription $userDefinedFieldPlaceHolderDescriptionObject=null, ?ilObjectCustomUserFieldsPlaceholderDescription $customUserFieldsPlaceholderDescriptionObject=null, ?Profile $profile=null)
readonly ilLanguage $language
createPlaceholderHtmlDescription(?ilTemplate $template=null)
getPlaceholderDescriptions()
This method MUST return an array containing an array with the description as array value.
readonly ilDefaultPlaceholderDescription $defaultPlaceHolderDescriptionObject
readonly ilObjectCustomUserFieldsPlaceholderDescription $customUserFieldsPlaceholderDescriptionObject
Collection of basic placeholder values that can be used.
loadLanguageModule(string $a_module)
Load language module.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
getPlaceholderDescriptions()
This method MUST return an array containing an array with the the description as array value.
special template class to simplify handling of ITX/PEAR