42 $this->
lng = $DIC->language();
44 $this->main_tpl =
$DIC->ui()->mainTemplate();
47 public function setId(
string $a_val): void
59 $this->link_title = $a_val;
69 $this->items = $a_val;
78 string $a_selectionheaderclass
80 $this->selectionheaderclass = $a_selectionheaderclass;
85 return $this->selectionheaderclass;
90 $this->form_cmd = $a_val;
95 return $this->form_cmd;
100 $this->field_var = $a_val;
105 return $this->field_var;
110 $this->hidden_var = $a_val;
115 return $this->hidden_var;
118 public function getHTML(
bool $pull_right =
true): string
122 $items = $this->getItems();
125 "tpl.checkbox_list_overlay.html",
128 "Services/UIComponent/CheckboxListOverlay",
134 $this->main_tpl->addOnLoadCode(
"$('#chkbxlstovl_" . $this->
getId() .
"').click(function(event){
135 event.stopPropagation();
138 $tpl->touchBlock(
"top_img");
141 $tpl->setVariable(
"TXT_SEL_TOP", $this->getLinkTitle());
143 $tpl->parseCurrentBlock();
147 foreach ($items as $k => $v) {
148 $tpl->setCurrentBlock(
"list_entry");
149 $tpl->setVariable(
"VAR", $this->getFieldVar());
150 $tpl->setVariable(
"VAL_ENTRY", $k);
151 $tpl->setVariable(
"TXT_ENTRY", $v[
"txt"]);
152 $tpl->setVariable(
"IDX_ENTRY", ++$cnt);
153 if ($v[
"selected"]) {
154 $tpl->setVariable(
"CHECKED",
"checked='checked'");
156 $tpl->parseCurrentBlock();
160 $tpl->touchBlock(
"pr");
164 $tpl->setVariable(
"HIDDEN_VAR", $this->getHiddenVar());
165 $tpl->setVariable(
"CMD_SUBMIT", $this->getFormCmd());
166 $tpl->setVariable(
"VAL_SUBMIT",
$lng->txt(
"refresh"));
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setFormCmd(string $a_val)
setLinkTitle(string $a_val)
setFieldVar(string $a_val)
getHTML(bool $pull_right=true)
string $selectionheaderclass
__construct(string $a_id="")
ilGlobalTemplateInterface $main_tpl
setHiddenVar(string $a_val)
getSelectionHeaderClass()
setSelectionHeaderClass(string $a_selectionheaderclass)
special template class to simplify handling of ITX/PEAR
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl