3declare(strict_types=1);
37 $this->
setType(
"section_header");
45 public function setType(
string $a_type): void
47 $this->type = $a_type;
59 $this->section_icon[
'file'] = $a_file;
60 $this->section_icon[
'alt'] = $a_alt;
65 return $this->section_icon ?: array();
68 public function setTitle(
string $a_title): void
70 $this->title = $a_title;
78 public function setInfo(
string $a_info): void
80 $this->
info = $a_info;
90 $this->parentform = $a_parentform;
95 return $this->parentform;
100 $this->section_anchor = $value;
105 $section_icon = $this->getSectionIcon();
107 if (isset($section_icon[
'file']) && is_file($section_icon[
'file'])) {
109 $a_tpl->
setVariable(
"IMG_ICON", $section_icon[
'file']);
110 $a_tpl->
setVariable(
'IMG_ALT', $section_icon[
'alt']);
115 $a_tpl->
setVariable(
"TXT_TITLE", $this->getTitle());
116 $a_tpl->
setVariable(
"TXT_DESCRIPTION", $this->getInfo());
118 if (isset($this->section_anchor)) {
119 $a_tpl->
setVariable(
'LABEL', $this->section_anchor);
setVariable($variable, $value='')
Sets a variable value.
special template class to simplify handling of ITX/PEAR
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)