39 $this->
ctrl = $DIC->ctrl();
44 bool $a_pullright =
false 46 $this->as_dropdown = $a_val;
47 $this->dd_pullright = $a_pullright;
57 string $a_add_class =
"" 59 $this->items[] = array(
"type" =>
"group_head",
"content" => $a_content,
60 "add_class" => $a_add_class);
65 $this->items[] = array(
"type" =>
"sep");
70 $this->items[] = array(
"type" =>
"next_col");
71 $this->multi_column =
true;
77 string $a_target =
"",
78 string $a_onclick =
"",
79 string $a_add_class =
"",
82 string $a_tt_my =
"right center",
83 string $a_tt_at =
"left center",
84 bool $a_tt_use_htmlspecialchars =
true 86 $this->items[] = array(
"type" =>
"entry",
"content" => $a_content,
87 "href" => $a_href,
"target" => $a_target,
"onclick" => $a_onclick,
88 "add_class" => $a_add_class,
"id" => $a_id,
"ttip" => $a_ttip,
89 "tt_my" => $a_tt_my,
"tt_at" => $a_tt_at,
90 "tt_use_htmlspecialchars" => $a_tt_use_htmlspecialchars);
97 $tpl =
new ilTemplate(
"tpl.grouped_list.html",
true,
true,
"Services/UIComponent/GroupedList");
99 foreach ($this->items as
$i) {
100 switch ($i[
"type"]) {
102 $tpl->touchBlock(
"sep");
103 $tpl->touchBlock(
"item");
107 $tpl->touchBlock(
"next_col");
108 $tpl->touchBlock(
"item");
112 $tpl->setCurrentBlock(
"group_head");
113 if ($i[
"add_class"] !=
"") {
114 $tpl->setVariable(
"ADD_CLASS", $i[
"add_class"]);
116 $tpl->setVariable(
"GROUP_HEAD", $i[
"content"]);
117 $tpl->parseCurrentBlock();
118 $tpl->touchBlock(
"item");
122 if ($i[
"href"] !=
"") {
123 $tpl->setCurrentBlock(
"linked_entry");
124 if ($i[
"add_class"] !=
"") {
125 $tpl->setVariable(
"ADD_CLASS", $i[
"add_class"]);
128 $tpl->setVariable(
"TXT_ENTRY", $i[
"content"]);
129 if ($i[
"target"] !=
"") {
130 $tpl->setVariable(
"TARGET",
'target="' . $i[
"target"] .
'"');
132 $tpl->setVariable(
"TARGET",
'target="_top"');
134 if ($i[
"onclick"] !=
"") {
135 $tpl->setVariable(
"ONCLICK",
'onclick="' . $i[
"onclick"] .
'"');
137 if ($i[
"id"] !=
"") {
138 $tpl->setVariable(
"ID",
'id="' . $i[
"id"] .
'"');
141 $tpl->setVariable(
"ITEM_ROLE",
'role="menuitem"');
143 $tpl->parseCurrentBlock();
144 $tpl->touchBlock(
"item");
145 if ($i[
"ttip"] !=
"" && $i[
"id"] !=
"") {
146 if ($ilCtrl->isAsynch()) {
153 $i[
"tt_use_htmlspecialchars"]
162 $i[
"tt_use_htmlspecialchars"]
167 $tpl->setCurrentBlock(
"unlinked_entry");
168 if ($i[
"add_class"] !=
"") {
169 $tpl->setVariable(
"ADD_CLASS2", $i[
"add_class"]);
171 $tpl->setVariable(
"TXT_ENTRY2", $i[
"content"]);
172 $tpl->parseCurrentBlock();
178 if ($this->multi_column) {
179 $tpl->touchBlock(
"multi_start");
180 $tpl->touchBlock(
"multi_end");
183 if ($tt_calls !==
"") {
184 $tpl->setCurrentBlock(
"script");
185 $tpl->setVariable(
"TT_CALLS", $tt_calls);
186 $tpl->parseCurrentBlock();
189 if ($this->
id !==
"") {
190 $tpl->setCurrentBlock(
"id");
191 $tpl->setVariable(
"ID", $this->
id);
192 $tpl->parseCurrentBlock();
196 if ($this->dd_pullright) {
197 $tpl->setVariable(
"LIST_CLASS",
"dropdown-menu pull-right");
199 $tpl->setVariable(
"LIST_CLASS",
"dropdown-menu");
201 $tpl->setVariable(
"LIST_ROLE",
'role="menu"');
203 $tpl->setVariable(
"LIST_CLASS",
"");
204 $tpl->setVariable(
"LIST_ROLE",
"");
static secureUrl(string $url)
addEntry(string $a_content, string $a_href="", string $a_target="", string $a_onclick="", string $a_add_class="", string $a_id="", string $a_ttip="", string $a_tt_my="right center", string $a_tt_at="left center", bool $a_tt_use_htmlspecialchars=true)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
setAsDropDown(bool $a_val, bool $a_pullright=false)
addGroupHeader(string $a_content, string $a_add_class="")
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl