ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilAdvancedSelectionListGUI.php
Go to the documentation of this file.
1<?php
2
26{
27 private array $items = array();
28 private string $id = "asl";
29 private bool $asynch = false;
30
31 public const DOWN_ARROW_DARK = "down_arrow_dark";
32 public const ICON_ARROW = "caret";
33 public const ICON_CONFIG = "glyphicon glyphicon-cog";
34 public const NO_ICON = "";
35
36 public const MODE_LINKS = "links";
37 public const MODE_FORM_SELECT = "select";
38
39 public const ON_ITEM_CLICK_HREF = "href";
40 public const ON_ITEM_CLICK_FORM_SUBMIT = "submit";
41 public const ON_ITEM_CLICK_FORM_SELECT = "select";
42 public const ON_ITEM_CLICK_NOP = "nop";
43
44 public const STYLE_DEFAULT = 0;
45 public const STYLE_LINK = 1;
46 public const STYLE_EMPH = 2;
47 public const STYLE_LINK_BUTTON = 3;
48
49 protected string $css_row = "";
50 protected bool $access_key = false;
51 protected ?array $toggle = null;
52 protected string $asynch_url = '';
53 protected string $selected_value = "";
54 protected string $trigger_event = "click";
55 protected bool $auto_hide = false;
57 protected int $style = 0;
58 private bool $dd_pullright = true;
59
60 protected string $listtitle = "";
61 protected string $aria_listtitle = "";
62 protected bool $useimages = false;
63 protected string $itemlinkclass = '';
64 protected string $mode = "";
65 protected array $links_mode = [];
66 protected string $selectionheaderclass = "";
67 protected string $headericon = "";
68 protected string $nojslinkclass = "";
69 protected string $on_click = "";
70
72 protected array $form_mode = [
73 "select_name" => '',
74 "select_class" => '',
75 "include_form_tag" => false,
76 "form_action" => '',
77 "form_id" => '',
78 "form_class" => '',
79 "form_target" => '',
80 "button_text" => '',
81 "button_class" => '',
82 "button_cmd" => ''
83 ];
84
85 protected string $select_callback = '';
86 protected string $sel_head_span_class = '';
87 private \ILIAS\UI\Renderer $renderer;
88 protected ilLanguage $lng;
89 protected string $on_click_form_id;
91
92 /*
93
94 The modes implement the following html for non-js fallback:
95
96 MODE_LINKS:
97
98 <a href="...">...</a> <a href="...">...<a>
99
100 MODE_FORM_SELECT: (form and submit tags are optional)
101
102 <form id="..." class="..." method="post" action="..." target="_top">
103 <select name="..." class="..." size="0">
104 <option value="...">...</option>
105 ...
106 </select>
107 <input class="ilEditSubmit" type="submit" value="Go"/>
108 </form>
109
110 */
111
112 public function __construct()
113 {
115 global $DIC;
116
117 $this->renderer = $DIC->ui()->renderer();
118 $this->lng = $DIC->language();
119 $this->mode = self::MODE_LINKS;
120 $this->setHeaderIcon(self::DOWN_ARROW_DARK);
121 $this->setOnClickMode(self::ON_ITEM_CLICK_HREF);
122 $this->global_tpl = $DIC['tpl'];
123 }
124
128 public function setLinksMode(
129 string $a_link_class = ""
130 ): void {
131 $this->mode = self::MODE_LINKS;
132 $this->links_mode = array(
133 "link_class" => $a_link_class);
134 }
135
140 public function setFormSelectMode(
141 string $a_select_name,
142 string $a_select_class = "",
143 bool $a_include_form_tag = false,
144 string $a_form_action = "",
145 string $a_form_id = "",
146 string $a_form_class = "",
147 string $a_form_target = "_top",
148 string $a_button_text = "",
149 string $a_button_class = "",
150 string $a_button_cmd = ""
151 ): void {
152 $this->mode = self::MODE_FORM_SELECT;
153 $this->form_mode = array(
154 "select_name" => $a_select_name,
155 "select_class" => $a_select_class,
156 "include_form_tag" => $a_include_form_tag,
157 "form_action" => $a_form_action,
158 "form_id" => $a_form_id,
159 "form_class" => $a_form_class,
160 "form_target" => $a_form_target,
161 "button_text" => $a_button_text,
162 "button_class" => $a_button_class,
163 "button_cmd" => $a_button_cmd
164 );
165 }
166
167 public function addItem(
168 string $a_title,
169 string $a_value = "",
170 string $a_link = "",
171 string $a_img = "",
172 string $a_alt = "",
173 string $a_frame = "",
174 string $a_html = "",
175 bool $a_prevent_background_click = false,
176 string $a_onclick = "",
177 string $a_ttip = "",
178 string $a_tt_my = "right center",
179 string $a_tt_at = "left center",
180 bool $a_tt_use_htmlspecialchars = true,
181 array $a_data = array()
182 ): void {
183 $this->items[] = array("title" => $a_title, "value" => $a_value,
184 "link" => $a_link, "img" => $a_img, "alt" => $a_alt, "frame" => $a_frame,
185 "html" => $a_html, "prevent_background_click" => $a_prevent_background_click,
186 "onclick" => $a_onclick, "ttip" => $a_ttip, "tt_my" => $a_tt_my, "tt_at" => $a_tt_at,
187 "tt_use_htmlspecialchars" => $a_tt_use_htmlspecialchars, "data" => $a_data);
188 }
189
190 public function addComponent(\ILIAS\UI\Component\Component $component): void
191 {
192 $this->items[] = [
193 'component' => $component,
194 ];
195 }
196
197 public function setGroupedList(ilGroupedListGUI $a_val): void
198 {
199 $this->grouped_list = $a_val;
200 }
201
203 {
204 return $this->grouped_list;
205 }
206
207 public function flush(): void
208 {
209 $this->items = array();
210 }
211
212 public function getItems(): array
213 {
214 return $this->items;
215 }
216
217 public function setListTitle(string $a_listtitle): void
218 {
219 $this->listtitle = $a_listtitle;
220 }
221
222 public function getListTitle(): string
223 {
224 return $this->listtitle;
225 }
226
227 public function setAriaListTitle(string $a_listtitle): void
228 {
229 $this->aria_listtitle = $a_listtitle;
230 }
231
232 public function getAriaListTitle(): string
233 {
234 return strip_tags($this->aria_listtitle);
235 }
236
241 public function setSelectionHeaderClass(string $a_selectionheaderclass): void
242 {
243 $this->selectionheaderclass = $a_selectionheaderclass;
244 }
245
246 public function getSelectionHeaderClass(): string
247 {
248 return $this->selectionheaderclass;
249 }
250
254 public function setStyle(int $a_val): void
255 {
256 $this->style = $a_val;
257 }
258
262 public function getStyle(): int
263 {
264 return $this->style;
265 }
266
267 public function setSelectionHeaderSpanClass(string $a_val): void
268 {
269 $this->sel_head_span_class = $a_val;
270 }
271
272 public function getSelectionHeaderSpanClass(): string
273 {
274 return $this->sel_head_span_class;
275 }
276
277 public function setHeaderIcon(string $a_headericon): void
278 {
279 $this->headericon = $a_headericon;
280 }
281
282 public function getHeaderIcon(): string
283 {
284 return $this->headericon;
285 }
286
287 public function setNoJSLinkClass(string $a_nojslinkclass): void
288 {
289 $this->nojslinkclass = $a_nojslinkclass;
290 }
291
292 public function getNoJSLinkClass(): string
293 {
294 return $this->nojslinkclass;
295 }
296
297 public function setItemLinkClass(string $a_itemlinkclass): void
298 {
299 $this->itemlinkclass = $a_itemlinkclass;
300 }
301
302 public function getItemLinkClass(): string
303 {
304 return $this->itemlinkclass;
305 }
306
307 public function setId(string $a_id): void
308 {
309 $this->id = $a_id;
310 }
311
312 public function getId(): string
313 {
314 return $this->id;
315 }
316
317 public function setUseImages(bool $a_useimages): void
318 {
319 $this->useimages = $a_useimages;
320 }
321
322 public function getUseImages(): bool
323 {
324 return $this->useimages;
325 }
326
327 public function setTriggerEvent(string $a_val): void
328 {
329 $this->trigger_event = $a_val;
330 }
331
332 public function getTriggerEvent(): string
333 {
334 return $this->trigger_event;
335 }
336
337 public function setAutoHide(bool $a_val): void
338 {
339 $this->auto_hide = $a_val;
340 }
341
342 public function getAutoHide(): bool
343 {
344 return $this->auto_hide;
345 }
346
355 public function setOnClickMode(
356 string $a_val,
357 string $a_onclick_form_id = ""
358 ): void {
359 $this->on_click = $a_val;
360 $this->on_click_form_id = $a_onclick_form_id;
361 }
362
363 public function getOnClickMode(): string
364 {
365 return $this->on_click;
366 }
367
368 public function setSelectedValue(string $a_val): void
369 {
370 $this->selected_value = $a_val;
371 }
372
373 public function getSelectedValue(): string
374 {
375 return $this->selected_value;
376 }
377
383 public function setAdditionalToggleElement(string $a_el, string $a_on): void
384 {
385 $this->toggle = array("el" => $a_el, "class_on" => $a_on);
386 }
387
391 public function getAdditionalToggleElement(): ?array
392 {
393 return $this->toggle;
394 }
395
396 public function setAsynch(bool $a_val): void
397 {
398 if ($a_val) {
400 }
401 $this->asynch = $a_val;
402 }
403
404 public function getAsynch(): bool
405 {
406 return $this->asynch;
407 }
408
409 public function setAsynchUrl(string $a_val): void
410 {
411 $this->asynch_url = $a_val;
412 }
413
414 public function getAsynchUrl(): string
415 {
416 return $this->asynch_url;
417 }
418
419 public function setSelectCallback(string $a_val): void
420 {
421 $this->select_callback = $a_val;
422 }
423
424 public function getSelectCallback(): string
425 {
426 return $this->select_callback;
427 }
428
429 public function setPullRight(bool $a_val): void
430 {
431 $this->dd_pullright = $a_val;
432 }
433
434 public function getPullRight(): bool
435 {
436 return $this->dd_pullright;
437 }
438
439 public function getToolbarHTML(): string
440 {
441 return $this->getHTML();
442 }
443
444 public function getHTML(bool $a_only_cmd_list_asynch = false): string
445 {
446 $items = $this->getItems();
447
448 // do not show list, if no item is in list
449 if (count($items) === 0 && !$this->getAsynch() && $this->getGroupedList() === null) {
450 return "";
451 }
452
453 $this->global_tpl->addJavaScript("assets/js/AdvancedSelectionList.js");
454
455 $tpl = new ilTemplate(
456 "tpl.adv_selection_list.html",
457 true,
458 true,
459 "components/ILIAS/UIComponent/AdvancedSelectionList",
460 "DEFAULT",
461 false,
462 true
463 );
464
465 reset($items);
466
467 $cnt = 0;
468
469 if ($this->getAsynch()) {
470 $tpl->setCurrentBlock("asynch_request");
471 $tpl->setVariable("IMG_LOADER", ilUtil::getImagePath("media/loader.svg"));
472 $tpl->parseCurrentBlock();
473 } elseif ($this->getGroupedList() !== null) {
474 $tpl->setVariable("GROUPED_LIST_HTML", $this->getGroupedList()->getHTML());
475 } else {
476 foreach ($items as $item) {
477 $this->css_row = ($this->css_row !== "tblrow1_mo")
478 ? "tblrow1_mo"
479 : "tblrow2_mo";
480
481 if (isset($item['component'])) {
482 $tpl->setCurrentBlock('component');
483 $tpl->setVariable('COMPONENT', $this->renderer->render([$item['component']]));
484 $tpl->parseCurrentBlock();
485
486 $tpl->setCurrentBlock('item_loop');
487 $tpl->parseCurrentBlock();
488 continue;
489 }
490
491 $item["value"] = htmlspecialchars($item["value"] ?? '', ENT_QUOTES);
492
493 if ($this->getUseImages()) {
494 if ($item["img"]) {
495 $tpl->setCurrentBlock("image");
496 $tpl->setVariable("IMG_ITEM", $item["img"]);
497 $tpl->setVariable("ALT_ITEM", $item["alt"]);
498 $tpl->parseCurrentBlock();
499 } else {
500 $tpl->touchBlock("no_image");
501 }
502 }
503
504 if ($this->getOnClickMode() === self::ON_ITEM_CLICK_HREF || $this->getItemLinkClass() !== "") {
505 if ($item["frame"]) {
506 $tpl->setCurrentBlock("frame");
507 $tpl->setVariable("TARGET_ITEM", $item["frame"]);
508 $tpl->parseCurrentBlock();
509 }
510
511 if ($this->getItemLinkClass() !== "") {
512 $tpl->setCurrentBlock("item_link_class");
513 $tpl->setVariable("ITEM_LINK_CLASS", $this->getItemLinkClass());
514 $tpl->parseCurrentBlock();
515 }
516
517 if (is_array($item["data"])) {
518 foreach ($item["data"] as $k => $v) {
519 $tpl->setCurrentBlock("f_data");
520 $tpl->setVariable("DATA_KEY", $k);
521 $tpl->setVariable("DATA_VAL", ilLegacyFormElementsUtil::prepareFormOutput($v));
522 $tpl->parseCurrentBlock();
523 }
524 }
525 if ($item["value"] != "") {
526 $tpl->setCurrentBlock("item_id");
527 $tpl->setVariable("ID_ITEM", $this->getId() . "_" . $item["value"]);
528 $tpl->parseCurrentBlock();
529 }
530
531 $tpl->setCurrentBlock("href_s");
532 $tpl->setVariable("HREF_ITEM", 'href="' . $item["link"] . '"');
533 $tpl->parseCurrentBlock();
534
535 $tpl->touchBlock("href_e");
536 }
537
538 $tpl->setCurrentBlock("item");
539 if ($this->getOnClickMode() === self::ON_ITEM_CLICK_HREF) {
540 if ($item["prevent_background_click"]) {
541 $tpl->setVariable("ONCLICK_ITEM", '');
542 } elseif ($item["onclick"] == "" && $item["frame"] != "") { // see #28730
543 $tpl->setVariable(
544 "ONCLICK_ITEM",
545 'onclick="' . "return il.AdvancedSelectionList.openTarget('" . $item["link"] . "','" . $item["frame"] . "');" . '"'
546 );
547 } elseif ($item["onclick"] != "") {
548 $tpl->setVariable(
549 "ONCLICK_ITEM",
550 'onclick="' . "return " . $item["onclick"] . ";" . '"'
551 );
552 }
553 } elseif ($this->getOnClickMode() === self::ON_ITEM_CLICK_FORM_SUBMIT) {
554 $tpl->setVariable(
555 "ONCLICK_ITEM",
556 'onclick="return il.AdvancedSelectionList.submitForm(\'' . $this->getId() . '\'' .
557 ", '" . $this->form_mode["select_name"] . "','" . $item["value"] . "'," .
558 "'" . $this->on_click_form_id . "','" . $this->form_mode["button_cmd"] . "');\""
559 );
560 } elseif ($this->getOnClickMode() === self::ON_ITEM_CLICK_FORM_SELECT) {
561 $tpl->setVariable(
562 "ONCLICK_ITEM",
563 'onclick="return il.AdvancedSelectionList.selectForm(\'' . $this->getId() . '\'' .
564 ", '" . $this->form_mode["select_name"] . "','" . $item["value"] . "'," .
565 "'" . $item["title"] . "');\""
566 );
567 } elseif ($this->getOnClickMode() === self::ON_ITEM_CLICK_NOP) {
568 $tpl->setVariable(
569 "ONCLICK_ITEM",
570 'onclick="il.AdvancedSelectionList.clickNop(\'' . $this->getId() . '\'' .
571 ", '" . $this->form_mode["select_name"] . "','" . $item["value"] . "'," .
572 "'" . $item["title"] . "');\""
573 );
574 }
575
576 $tpl->setVariable("CSS_ROW", $this->css_row);
577 if ($item["html"] == "") {
578 $tpl->setVariable("TXT_ITEM", $item["title"]);
579 } else {
580 $tpl->setVariable("TXT_ITEM", $item["html"]);
581 }
582
583 $tpl->setVariable("ID_ITEM_TR", $this->getId() . "_" . $item["value"] . "_tr");
584
585 $tpl->parseCurrentBlock();
586
587 $tpl->setCurrentBlock('item_loop');
588 $tpl->parseCurrentBlock();
589 }
590
591 // output hidden input, if click mode is form submission
592 if ($this->getOnClickMode() === self::ON_ITEM_CLICK_FORM_SUBMIT) {
593 $tpl->setCurrentBlock("hidden_input");
594 $tpl->setVariable("HID", $this->getId());
595 $tpl->parseCurrentBlock();
596 }
597
598 // output hidden input and initialize
599 if ($this->getOnClickMode() === self::ON_ITEM_CLICK_FORM_SELECT) {
600 if ($this->getSelectedValue() !== "") {
601 $tpl->setCurrentBlock("selected_val");
602 $tpl->setVariable("SEL_VAL", $this->getSelectedValue());
603 $tpl->parseCurrentBlock();
604 }
605 $tpl->setCurrentBlock("hidden_input");
606 $tpl->setVariable("HID", $this->getId());
607 $tpl->parseCurrentBlock();
608 }
609 }
610
611 if ($a_only_cmd_list_asynch) {
612 $tpl->touchBlock("cmd_table");
613 return $tpl->get("item_loop");
614 }
615
616 if ($this->getGroupedList() === null) {
617 $tpl->setCurrentBlock("dd_content");
618 if ($this->getPullRight()) {
619 $tpl->setVariable("UL_CLASS", "dropdown-menu pull-right");
620 } else {
621 $tpl->setVariable("UL_CLASS", "dropdown-menu");
622 }
623 $tpl->setVariable("TABLE_ID", $this->getId());
624 $tpl->parseCurrentBlock();
625 }
626
627 if ($this->getHeaderIcon() !== self::NO_ICON) {
628 $tpl->setCurrentBlock("top_img");
629 switch ($this->getHeaderIcon()) {
630 case self::ICON_CONFIG:
631 $tpl->setVariable("IMG_SPAN_STYLE", self::ICON_CONFIG);
632 break;
633
634 case self::DOWN_ARROW_DARK:
635 default:
636 $tpl->setVariable("IMG_SPAN_STYLE", self::ICON_ARROW);
637 break;
638 }
639 $tpl->parseCurrentBlock();
640 }
641
642
643 if ($this->getAsynch()) {
644 $js_tpl = $this->getJSTemplate();
645 $js_tpl->setVariable("ID", $this->getId());
646 $js_tpl->setCurrentBlock("asynch_bl");
647 $js_tpl->setVariable("ASYNCH_URL", $this->getAsynchUrl());
648 $js_tpl->setVariable("ASYNCH_ID", $this->getId());
649 $js_tpl->setVariable("ASYNCH_TRIGGER_ID", $this->getId());
650 $js_tpl->parseCurrentBlock();
651 $this->global_tpl->addOnloadCode(
652 $js_tpl->get()
653 );
654 }
655
656 // js section
657 $tpl->setCurrentBlock("js_section");
658
659 $cfg["trigger_event"] = $this->getTriggerEvent();
660 $cfg["auto_hide"] = $this->getAutoHide();
661
662 if ($this->getSelectCallback() !== "") {
663 $cfg["select_callback"] = $this->getSelectCallback();
664 }
665 $cfg["anchor_id"] = "ilAdvSelListAnchorElement_" . $this->getId();
666 $cfg["asynch"] = $this->getAsynch();
667 $cfg["asynch_url"] = $this->getAsynchUrl();
668 $toggle = $this->getAdditionalToggleElement();
669 if (is_array($toggle)) {
670 $cfg["toggle_el"] = $toggle["el"];
671 $cfg["toggle_class_on"] = $toggle["class_on"];
672 }
673 //echo "<br>".htmlentities($this->getAsynchUrl());
674 $tpl->setVariable("CFG", json_encode($cfg, JSON_THROW_ON_ERROR));
675
676 //echo htmlentities(json_encode($cfg, JSON_THROW_ON_ERROR));
677
678 if ($this->getListTitle() !== "") {
679 $tpl->setVariable("TXT_SEL_TOP", $this->getListTitle());
680 }
681 if ($this->getListTitle() === "" || $this->getAriaListTitle() !== "") {
682 $aria_title = ($this->getAriaListTitle() !== "")
683 ? $this->getAriaListTitle()
684 : $this->lng->txt("actions");
685 $tpl->setVariable("TXT_ARIA_TOP", $aria_title);
686 }
687 $tpl->setVariable("ID", $this->getId());
688
689 //$tpl->setVariable("CLASS_SEL_TOP", $this->getSelectionHeaderClass());
690 switch ($this->getStyle()) {
691 case self::STYLE_DEFAULT:
692 $tpl->setVariable("BTN_CLASS", "btn btn-default");
693 $tpl->setVariable("TAG", "button");
694 break;
695
696 case self::STYLE_EMPH:
697 $tpl->setVariable("BTN_CLASS", "btn btn-primary");
698 $tpl->setVariable("TAG", "button");
699 break;
700
701 case self::STYLE_LINK_BUTTON:
702 $tpl->setVariable("BTN_CLASS", "btn btn-link");
703 $tpl->setVariable("TAG", "button");
704 break;
705
706 case self::STYLE_LINK:
707 $tpl->setVariable("BTN_CLASS", "");
708 $tpl->setVariable("TAG", "a");
709 $tpl->touchBlock("href_link");
710 break;
711 }
712
713
714 if ($this->getSelectionHeaderSpanClass() !== "") {
715 $tpl->setVariable(
716 "CLASS_SEL_TOP_SPAN",
717 $this->getSelectionHeaderSpanClass()
718 );
719 }
720
721 // set the async url to an extra template variable
722 // (needed for a mobile skin)
723 // $tpl->setVariable("ASYNC_URL", $this->getAsynchUrl());
724
725 $tpl->parseCurrentBlock();
726
727 foreach ($this->getOnloadCode() as $code) {
728 $this->global_tpl->addOnLoadCode(
729 $code
730 );
731 }
732 return $tpl->get();
733 }
734
735
736 protected function getJSTemplate(): ilTemplate
737 {
738 return new ilTemplate(
739 "tpl.adv_selection_list_js_init.js",
740 true,
741 true,
742 "components/ILIAS/UIComponent/AdvancedSelectionList",
743 "DEFAULT",
744 false,
745 true
746 );
747 }
748
749 public function getOnloadCode(): array
750 {
751 $items = $this->getItems();
752
753 // do not show list, if no item is in list
754 if (count($items) === 0 && !$this->getAsynch() && $this->getGroupedList() === null) {
755 return [];
756 }
757
758 $js_tpl = $this->getJSTemplate();
759
760 $cnt = 0;
761
762 if (!$this->getAsynch() && $this->getGroupedList() === null) {
763 foreach ($items as $item) {
764 if (isset($item['component'])) {
765 continue;
766 }
767
768 // add item to js object
769 $js_tpl->setCurrentBlock("js_item");
770 $js_tpl->setVariable("IT_ID", $this->getId());
771 $js_tpl->setVariable("IT_HID_NAME", $this->form_mode["select_name"]);
772
773 $js_tpl->setVariable("IT_HID_VAL", $item["value"]);
774 $js_tpl->setVariable("IT_TITLE", str_replace("'", "\\'", $item["title"]));
775 $js_tpl->parseCurrentBlock();
776 }
777
778 // output hidden input, if click mode is form submission
779 if ($this->getOnClickMode() === self::ON_ITEM_CLICK_FORM_SUBMIT) {
780 $js_tpl->setCurrentBlock("hidden_input");
781 $js_tpl->setVariable("HID", $this->getId());
782 $js_tpl->parseCurrentBlock();
783 }
784
785 // output hidden input and initialize
786 if ($this->getOnClickMode() === self::ON_ITEM_CLICK_FORM_SELECT) {
787 // init hidden input with selected value
788 $js_tpl->setCurrentBlock("init_hidden_input");
789 $js_tpl->setVariable("H2ID", $this->getId());
790 $js_tpl->setVariable("HID_NAME", $this->form_mode["select_name"]);
791 $js_tpl->setVariable("HID_VALUE", $this->getSelectedValue());
792 $js_tpl->parseCurrentBlock();
793 }
794 }
795
796 $js_tpl->setVariable("ID", $this->getId());
797
798 return [$js_tpl->get()];
799 }
800}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
renderer()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getAdditionalToggleElement()
Get additional toggle element.
setAdditionalToggleElement(string $a_el, string $a_on)
Set additional toggle element.
addComponent(\ILIAS\UI\Component\Component $component)
setSelectionHeaderClass(string $a_selectionheaderclass)
DEPRECATED use set style instead.
getToolbarHTML()
Get input item HTML to be inserted into ilToolbarGUI.
setLinksMode(string $a_link_class="")
Set links mode (for no js fallback)
setFormSelectMode(string $a_select_name, string $a_select_class="", bool $a_include_form_tag=false, string $a_form_action="", string $a_form_id="", string $a_form_class="", string $a_form_target="_top", string $a_button_text="", string $a_button_class="", string $a_button_cmd="")
Set form mode (for no js fallback) Outputs form selection including surrounding form.
getHTML(bool $a_only_cmd_list_asynch=false)
addItem(string $a_title, string $a_value="", string $a_link="", string $a_img="", string $a_alt="", string $a_frame="", string $a_html="", bool $a_prevent_background_click=false, string $a_onclick="", string $a_ttip="", string $a_tt_my="right center", string $a_tt_at="left center", bool $a_tt_use_htmlspecialchars=true, array $a_data=array())
setOnClickMode(string $a_val, string $a_onclick_form_id="")
Set "onClick"- Mode.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
language handling
static prepareFormOutput($a_str, bool $a_strip=false)
special template class to simplify handling of ITX/PEAR
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static initConnection(?ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Connection module.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
global $DIC
Definition: shib_login.php:26