ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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;
56  protected ?ilGroupedListGUI $grouped_list = null;
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 
202  public function getGroupedList(): ?ilGroupedListGUI
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  {
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  {
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("./Services/UIComponent/AdvancedSelectionList/js/AdvancedSelectionList.js");
454 
455  $tpl = new ilTemplate(
456  "tpl.adv_selection_list.html",
457  true,
458  true,
459  "Services/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("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  if ($item["ttip"] != "") {
586  $this->getId() . "_" . $item["value"] . "_tr",
587  $item["ttip"],
588  "",
589  $item["tt_my"],
590  $item["tt_at"],
591  $item["tt_use_htmlspecialchars"]
592  );
593  }
594 
595  $tpl->parseCurrentBlock();
596 
597  $tpl->setCurrentBlock('item_loop');
598  $tpl->parseCurrentBlock();
599  }
600 
601  // output hidden input, if click mode is form submission
602  if ($this->getOnClickMode() === self::ON_ITEM_CLICK_FORM_SUBMIT) {
603  $tpl->setCurrentBlock("hidden_input");
604  $tpl->setVariable("HID", $this->getId());
605  $tpl->parseCurrentBlock();
606  }
607 
608  // output hidden input and initialize
609  if ($this->getOnClickMode() === self::ON_ITEM_CLICK_FORM_SELECT) {
610  if ($this->getSelectedValue() !== "") {
611  $tpl->setCurrentBlock("selected_val");
612  $tpl->setVariable("SEL_VAL", $this->getSelectedValue());
613  $tpl->parseCurrentBlock();
614  }
615  $tpl->setCurrentBlock("hidden_input");
616  $tpl->setVariable("HID", $this->getId());
617  $tpl->parseCurrentBlock();
618  }
619  }
620 
621  if ($a_only_cmd_list_asynch) {
622  $tpl->touchBlock("cmd_table");
623  return $tpl->get("item_loop");
624  }
625 
626  if ($this->getGroupedList() === null) {
627  $tpl->setCurrentBlock("dd_content");
628  if ($this->getPullRight()) {
629  $tpl->setVariable("UL_CLASS", "dropdown-menu pull-right");
630  } else {
631  $tpl->setVariable("UL_CLASS", "dropdown-menu");
632  }
633  $tpl->setVariable("TABLE_ID", $this->getId());
634  $tpl->parseCurrentBlock();
635  }
636 
637  if ($this->getHeaderIcon() !== self::NO_ICON) {
638  $tpl->setCurrentBlock("top_img");
639  switch ($this->getHeaderIcon()) {
640  case self::ICON_CONFIG:
641  $tpl->setVariable("IMG_SPAN_STYLE", self::ICON_CONFIG);
642  break;
643 
644  case self::DOWN_ARROW_DARK:
645  default:
646  $tpl->setVariable("IMG_SPAN_STYLE", self::ICON_ARROW);
647  break;
648  }
649  $tpl->parseCurrentBlock();
650  }
651 
652 
653  if ($this->getAsynch()) {
654  $js_tpl = $this->getJSTemplate();
655  $js_tpl->setVariable("ID", $this->getId());
656  $js_tpl->setCurrentBlock("asynch_bl");
657  $js_tpl->setVariable("ASYNCH_URL", $this->getAsynchUrl());
658  $js_tpl->setVariable("ASYNCH_ID", $this->getId());
659  $js_tpl->setVariable("ASYNCH_TRIGGER_ID", $this->getId());
660  $js_tpl->parseCurrentBlock();
661  $this->global_tpl->addOnloadCode(
662  $js_tpl->get()
663  );
664  }
665 
666  // js section
667  $tpl->setCurrentBlock("js_section");
668 
669  $cfg["trigger_event"] = $this->getTriggerEvent();
670  $cfg["auto_hide"] = $this->getAutoHide();
671 
672  if ($this->getSelectCallback() !== "") {
673  $cfg["select_callback"] = $this->getSelectCallback();
674  }
675  $cfg["anchor_id"] = "ilAdvSelListAnchorElement_" . $this->getId();
676  $cfg["asynch"] = $this->getAsynch();
677  $cfg["asynch_url"] = $this->getAsynchUrl();
678  $toggle = $this->getAdditionalToggleElement();
679  if (is_array($toggle)) {
680  $cfg["toggle_el"] = $toggle["el"];
681  $cfg["toggle_class_on"] = $toggle["class_on"];
682  }
683  //echo "<br>".htmlentities($this->getAsynchUrl());
684  $tpl->setVariable("CFG", json_encode($cfg, JSON_THROW_ON_ERROR));
685 
686  //echo htmlentities(json_encode($cfg, JSON_THROW_ON_ERROR));
687 
688  $tpl->setVariable("TXT_SEL_TOP", $this->getListTitle());
689  if ($this->getListTitle() === "" || $this->getAriaListTitle() !== "") {
690  $aria_title = ($this->getAriaListTitle() !== "")
691  ? $this->getAriaListTitle()
692  : $this->lng->txt("actions");
693  $tpl->setVariable("TXT_ARIA_TOP", $aria_title);
694  }
695  $tpl->setVariable("ID", $this->getId());
696 
697  //$tpl->setVariable("CLASS_SEL_TOP", $this->getSelectionHeaderClass());
698  switch ($this->getStyle()) {
699  case self::STYLE_DEFAULT:
700  $tpl->setVariable("BTN_CLASS", "btn btn-default");
701  $tpl->setVariable("TAG", "button");
702  break;
703 
704  case self::STYLE_EMPH:
705  $tpl->setVariable("BTN_CLASS", "btn btn-primary");
706  $tpl->setVariable("TAG", "button");
707  break;
708 
709  case self::STYLE_LINK_BUTTON:
710  $tpl->setVariable("BTN_CLASS", "btn btn-link");
711  $tpl->setVariable("TAG", "button");
712  break;
713 
714  case self::STYLE_LINK:
715  $tpl->setVariable("BTN_CLASS", "");
716  $tpl->setVariable("TAG", "a");
717  $tpl->touchBlock("href_link");
718  break;
719  }
720 
721 
722  if ($this->getSelectionHeaderSpanClass() !== "") {
723  $tpl->setVariable(
724  "CLASS_SEL_TOP_SPAN",
726  );
727  }
728 
729  // set the async url to an extra template variable
730  // (needed for a mobile skin)
731  // $tpl->setVariable("ASYNC_URL", $this->getAsynchUrl());
732 
733  $tpl->parseCurrentBlock();
734 
735  foreach ($this->getOnloadCode() as $code) {
736  $this->global_tpl->addOnLoadCode(
737  $code
738  );
739  }
740  return $tpl->get();
741  }
742 
743 
744  protected function getJSTemplate(): ilTemplate
745  {
746  return new ilTemplate(
747  "tpl.adv_selection_list_js_init.js",
748  true,
749  true,
750  "Services/UIComponent/AdvancedSelectionList",
751  "DEFAULT",
752  false,
753  true
754  );
755  }
756 
757  public function getOnloadCode(): array
758  {
759  $items = $this->getItems();
760 
761  // do not show list, if no item is in list
762  if (count($items) === 0 && !$this->getAsynch() && $this->getGroupedList() === null) {
763  return [];
764  }
765 
766  $js_tpl = $this->getJSTemplate();
767 
768  $cnt = 0;
769 
770  if (!$this->getAsynch() && $this->getGroupedList() === null) {
771  foreach ($items as $item) {
772  if (isset($item['component'])) {
773  continue;
774  }
775 
776  // add item to js object
777  $js_tpl->setCurrentBlock("js_item");
778  $js_tpl->setVariable("IT_ID", $this->getId());
779  $js_tpl->setVariable("IT_HID_NAME", $this->form_mode["select_name"]);
780 
781  $js_tpl->setVariable("IT_HID_VAL", $item["value"]);
782  $js_tpl->setVariable("IT_TITLE", str_replace("'", "\\'", $item["title"]));
783  $js_tpl->parseCurrentBlock();
784  }
785 
786  // output hidden input, if click mode is form submission
787  if ($this->getOnClickMode() === self::ON_ITEM_CLICK_FORM_SUBMIT) {
788  $js_tpl->setCurrentBlock("hidden_input");
789  $js_tpl->setVariable("HID", $this->getId());
790  $js_tpl->parseCurrentBlock();
791  }
792 
793  // output hidden input and initialize
794  if ($this->getOnClickMode() === self::ON_ITEM_CLICK_FORM_SELECT) {
795  // init hidden input with selected value
796  $js_tpl->setCurrentBlock("init_hidden_input");
797  $js_tpl->setVariable("H2ID", $this->getId());
798  $js_tpl->setVariable("HID_NAME", $this->form_mode["select_name"]);
799  $js_tpl->setVariable("HID_VALUE", $this->getSelectedValue());
800  $js_tpl->parseCurrentBlock();
801  }
802  }
803 
804  $js_tpl->setVariable("ID", $this->getId());
805 
806  return [$js_tpl->get()];
807  }
808 }
setAdditionalToggleElement(string $a_el, string $a_on)
Set additional toggle element.
Class Factory.
setOnClickMode(string $a_val, string $a_onclick_form_id="")
Set "onClick"- Mode.
Class ChatMainBarProvider .
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
getAdditionalToggleElement()
Get additional toggle element.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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.
static prepareFormOutput($a_str, bool $a_strip=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())
getToolbarHTML()
Get input item HTML to be inserted into ilToolbarGUI.
global $DIC
Definition: feed.php:28
setLinksMode(string $a_link_class="")
Set links mode (for no js fallback)
getHTML(bool $a_only_cmd_list_asynch=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setSelectionHeaderClass(string $a_selectionheaderclass)
DEPRECATED use set style instead.
static addTooltip(string $a_el_id, string $a_text, string $a_container="", string $a_my="bottom center", string $a_at="top center", bool $a_use_htmlspecialchars=true)
__construct(Container $dic, ilPlugin $plugin)
addComponent(\ILIAS\UI\Component\Component $component)
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41
static initConnection(?ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Connection module.