Grouped list GUI class.
More...
|
| __construct ($id="") |
| Constructor. More...
|
|
| setAsDropDown ($a_val, $a_pullright=false) |
| Set as drop down. More...
|
|
| getAsDropDown () |
| Get as drop down. More...
|
|
| addGroupHeader ($a_content, $a_add_class="") |
| Add group header. More...
|
|
| addSeparator () |
| Add separator. More...
|
|
| nextColumn () |
| Add separator. More...
|
|
| addEntry ( $a_content, $a_href="", $a_target="", $a_onclick="", $a_add_class="", $a_id="", $a_ttip="", $a_tt_my="right center", $a_tt_at="left center", $a_tt_use_htmlspecialchars=true) |
| Add entry. More...
|
|
| getHTML () |
| Get HTML. More...
|
|
Grouped list GUI class.
- Author
- Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
- Version
- $Id$
Definition at line 12 of file class.ilGroupedListGUI.php.
◆ __construct()
ilGroupedListGUI::__construct |
( |
|
$id = "" | ) |
|
◆ addEntry()
ilGroupedListGUI::addEntry |
( |
|
$a_content, |
|
|
|
$a_href = "" , |
|
|
|
$a_target = "" , |
|
|
|
$a_onclick = "" , |
|
|
|
$a_add_class = "" , |
|
|
|
$a_id = "" , |
|
|
|
$a_ttip = "" , |
|
|
|
$a_tt_my = "right center" , |
|
|
|
$a_tt_at = "left center" , |
|
|
|
$a_tt_use_htmlspecialchars = true |
|
) |
| |
Add entry.
- Parameters
-
Definition at line 92 of file class.ilGroupedListGUI.php.
104 $this->items[] = array(
"type" =>
"entry",
"content" => $a_content,
105 "href" => $a_href,
"target" => $a_target,
"onclick" => $a_onclick,
106 "add_class" => $a_add_class,
"id" => $a_id,
"ttip" => $a_ttip,
107 "tt_my" => $a_tt_my,
"tt_at" => $a_tt_at,
108 "tt_use_htmlspecialchars" => $a_tt_use_htmlspecialchars);
◆ addGroupHeader()
ilGroupedListGUI::addGroupHeader |
( |
|
$a_content, |
|
|
|
$a_add_class = "" |
|
) |
| |
Add group header.
- Parameters
-
Definition at line 63 of file class.ilGroupedListGUI.php.
65 $this->items[] = array(
"type" =>
"group_head",
"content" => $a_content,
66 "add_class" => $a_add_class);
◆ addSeparator()
ilGroupedListGUI::addSeparator |
( |
| ) |
|
◆ getAsDropDown()
ilGroupedListGUI::getAsDropDown |
( |
| ) |
|
◆ getHTML()
ilGroupedListGUI::getHTML |
( |
| ) |
|
Get HTML.
- Parameters
-
Definition at line 118 of file class.ilGroupedListGUI.php.
References $ctrl, $i, $tpl, ilTooltipGUI\addTooltip(), getAsDropDown(), and ilUtil\secureUrl().
122 $tpl =
new ilTemplate(
"tpl.grouped_list.html",
true,
true,
"Services/UIComponent/GroupedList");
124 foreach ($this->items as
$i) {
125 switch ($i[
"type"]) {
127 $tpl->touchBlock(
"sep");
128 $tpl->touchBlock(
"item");
132 $tpl->touchBlock(
"next_col");
133 $tpl->touchBlock(
"item");
137 $tpl->setCurrentBlock(
"group_head");
138 if ($i[
"add_class"] !=
"") {
139 $tpl->setVariable(
"ADD_CLASS", $i[
"add_class"]);
141 $tpl->setVariable(
"GROUP_HEAD", $i[
"content"]);
142 $tpl->parseCurrentBlock();
143 $tpl->touchBlock(
"item");
147 if ($i[
"href"] !=
"") {
148 $tpl->setCurrentBlock(
"linked_entry");
149 if ($i[
"add_class"] !=
"") {
150 $tpl->setVariable(
"ADD_CLASS", $i[
"add_class"]);
153 $tpl->setVariable(
"TXT_ENTRY", $i[
"content"]);
154 if ($i[
"target"] !=
"") {
155 $tpl->setVariable(
"TARGET",
'target="' . $i[
"target"] .
'"');
157 $tpl->setVariable(
"TARGET",
'target="_top"');
159 if ($i[
"onclick"] !=
"") {
160 $tpl->setVariable(
"ONCLICK",
'onclick="' . $i[
"onclick"] .
'"');
162 if ($i[
"id"] !=
"") {
163 $tpl->setVariable(
"ID",
'id="' . $i[
"id"] .
'"');
165 $tpl->parseCurrentBlock();
166 $tpl->touchBlock(
"item");
167 if ($i[
"ttip"] !=
"" && $i[
"id"] !=
"") {
168 include_once(
"./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php");
169 if ($ilCtrl->isAsynch()) {
170 $tt_calls .=
" " . ilTooltipGUI::getTooltip(
176 $i[
"tt_use_htmlspecialchars"]
185 $i[
"tt_use_htmlspecialchars"]
190 $tpl->setCurrentBlock(
"unlinked_entry");
191 if ($i[
"add_class"] !=
"") {
192 $tpl->setVariable(
"ADD_CLASS2", $i[
"add_class"]);
194 $tpl->setVariable(
"TXT_ENTRY2", $i[
"content"]);
195 $tpl->parseCurrentBlock();
201 if ($this->multi_column) {
202 $tpl->touchBlock(
"multi_start");
203 $tpl->touchBlock(
"multi_end");
206 if ($tt_calls !=
"") {
207 $tpl->setCurrentBlock(
"script");
208 $tpl->setVariable(
"TT_CALLS", $tt_calls);
209 $tpl->parseCurrentBlock();
212 if ($this->
id !=
"") {
213 $tpl->setCurrentBlock(
"id");
214 $tpl->setVariable(
"ID", $this->
id);
215 $tpl->parseCurrentBlock();
219 if ($this->dd_pullright) {
220 $tpl->setVariable(
"LIST_CLASS",
"dropdown-menu pull-right");
222 $tpl->setVariable(
"LIST_CLASS",
"dropdown-menu");
224 $tpl->setVariable(
"LIST_ROLE",
'role="menu"');
226 $tpl->setVariable(
"LIST_CLASS",
"");
227 $tpl->setVariable(
"LIST_ROLE",
"");
getAsDropDown()
Get as drop down.
static secureUrl($url)
Prepare secure href attribute.
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
◆ nextColumn()
ilGroupedListGUI::nextColumn |
( |
| ) |
|
Add separator.
Definition at line 80 of file class.ilGroupedListGUI.php.
82 $this->items[] = array(
"type" =>
"next_col");
83 $this->multi_column =
true;
◆ setAsDropDown()
ilGroupedListGUI::setAsDropDown |
( |
|
$a_val, |
|
|
|
$a_pullright = false |
|
) |
| |
Set as drop down.
- Parameters
-
bool | $a_val | as drop down menu |
Definition at line 41 of file class.ilGroupedListGUI.php.
43 $this->as_dropdown = $a_val;
44 $this->dd_pullright = $a_pullright;
◆ $as_dropdown
ilGroupedListGUI::$as_dropdown = false |
|
protected |
◆ $ctrl
◆ $dd_pullright
ilGroupedListGUI::$dd_pullright = false |
|
protected |
◆ $id
◆ $items
ilGroupedListGUI::$items = array() |
|
protected |
◆ $multi_column
ilGroupedListGUI::$multi_column = false |
|
protected |
The documentation for this class was generated from the following file: