ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilAdvancedSelectionListGUI Class Reference

User interface class for advanced drop-down selection lists. More...

+ Collaboration diagram for ilAdvancedSelectionListGUI:

Public Member Functions

 __construct ()
 Constructor. More...
 
 setLinksMode ($a_link_class="")
 Set links mode (for no js fallback) More...
 
 setFormSelectMode ($a_select_name, $a_select_class="", $a_include_form_tag=false, $a_form_action="", $a_form_id="", $a_form_class="", $a_form_target="_top", $a_button_text="", $a_button_class="", $a_button_cmd="")
 Set form mode (for no js fallback) More...
 
 addItem ($a_title, $a_value="", $a_link="", $a_img="", $a_alt="", $a_frame="", $a_html="", $a_prevent_background_click=false, $a_onclick="", $a_ttip="", $a_tt_my="right center", $a_tt_at="left center", $a_tt_use_htmlspecialchars=true)
 Add an item. More...
 
 setGroupedList ($a_val)
 Set Grouped List. More...
 
 getGroupedList ()
 Get Grouped List. More...
 
 flush ()
 
 getItems ()
 Get items. More...
 
 setListTitle ($a_listtitle)
 Set List Title. More...
 
 getListTitle ()
 Get List Title. More...
 
 setSelectionHeaderClass ($a_selectionheaderclass)
 Set Selection Header Class. More...
 
 getSelectionHeaderClass ()
 Get Selection Header Class. More...
 
 setStyle ($a_val)
 Set style. More...
 
 getStyle ()
 Get style. More...
 
 setSelectionHeaderSpanClass ($a_val)
 Set selection header span class. More...
 
 getSelectionHeaderSpanClass ()
 Get selection header span class. More...
 
 setHeaderIcon ($a_headericon)
 Set Header Icon. More...
 
 getHeaderIcon ()
 Get Header Icon. More...
 
 setNoJSLinkClass ($a_nojslinkclass)
 Set No Javascript Link Style Class. More...
 
 getNoJSLinkClass ()
 Get No Javascript Link Style Class. More...
 
 setItemLinkClass ($a_itemlinkclass)
 Set Item Link Class. More...
 
 getItemLinkClass ()
 Get Item Link Class. More...
 
 setId ($a_id)
 Set Id. More...
 
 getId ()
 Get Id. More...
 
 setUseImages ($a_useimages)
 Set Use Images. More...
 
 getUseImages ()
 Get Use Images. More...
 
 setAccessKey ($a_val)
 Set access key. More...
 
 getAccessKey ()
 Get access key. More...
 
 setTriggerEvent ($a_val)
 Set trigger event. More...
 
 getTriggerEvent ()
 Get trigger event. More...
 
 setAutoHide ($a_val)
 Set auto hide. More...
 
 getAutoHide ()
 Get auto hide. More...
 
 setOnClickMode ($a_val, $a_onclick_form_id="")
 Set "onClick"- Mode. More...
 
 getOnClickMode ()
 Get "onClick"-Mode. More...
 
 setSelectedValue ($a_val)
 Set selected value. More...
 
 getSelectedValue ()
 Get selected value. More...
 
 setAdditionalToggleElement ($a_el, $a_on)
 Set additional toggle element. More...
 
 getAdditionalToggleElement ()
 Get additional toggle element. More...
 
 setAsynch ($a_val)
 Set asynch mode (this is set to true, if list should get items asynchronously) More...
 
 getAsynch ()
 Get asynch mode. More...
 
 setAsynchUrl ($a_val)
 Set asynch url. More...
 
 getAsynchUrl ()
 Get asynch url. More...
 
 setSelectCallback ($a_val)
 Set select callback. More...
 
 getSelectCallback ()
 Get select callback. More...
 
 setPullRight ($a_val)
 Set pull right. More...
 
 getPullRight ()
 Get pull right. More...
 
 getHTML ($a_only_cmd_list_asynch=false)
 Get selection list HTML. More...
 

Data Fields

const DOWN_ARROW_DARK = "down_arrow_dark"
 
const ICON_ARROW = "caret"
 
const ICON_CONFIG = "glyphicon glyphicon-cog"
 
const NO_ICON = ""
 
const MODE_LINKS = "links"
 
const MODE_FORM_SELECT = "select"
 
const ON_ITEM_CLICK_HREF = "href"
 
const ON_ITEM_CLICK_FORM_SUBMIT = "submit"
 
const ON_ITEM_CLICK_FORM_SELECT = "select"
 
const ON_ITEM_CLICK_NOP = "nop"
 
const STYLE_DEFAULT = 0
 
const STYLE_LINK = 1
 
const STYLE_EMPH = 2
 
const STYLE_LINK_BUTTON = 3
 

Protected Attributes

 $css_row = ""
 
 $access_key = false
 
 $toggle = false
 
 $asynch_url = false
 
 $selected_value = ""
 
 $trigger_event = "click"
 
 $auto_hide = false
 
 $grouped_list = null
 
 $style = 0
 

Private Attributes

 $items = array()
 
 $id = "asl"
 
 $asynch = false
 
 $dd_pullright = true
 

Detailed Description

User interface class for advanced drop-down selection lists.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id:$

Definition at line 11 of file class.ilAdvancedSelectionListGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilAdvancedSelectionListGUI::__construct ( )

Member Function Documentation

◆ addItem()

ilAdvancedSelectionListGUI::addItem (   $a_title,
  $a_value = "",
  $a_link = "",
  $a_img = "",
  $a_alt = "",
  $a_frame = "",
  $a_html = "",
  $a_prevent_background_click = false,
  $a_onclick = "",
  $a_ttip = "",
  $a_tt_my = "right center",
  $a_tt_at = "left center",
  $a_tt_use_htmlspecialchars = true 
)

Add an item.

Parameters
stringitem title
stringvalue (used for select input)
linkhref for the item
stringimage href attribute
stringimage alt attribute
stringframe target
stringitem html (is used instead of title if js is active)

Definition at line 123 of file class.ilAdvancedSelectionListGUI.php.

126 {
127 $this->items[] = array("title" => $a_title, "value" => $a_value,
128 "link" => $a_link, "img" => $a_img, "alt" => $a_alt, "frame" => $a_frame,
129 "html" => $a_html, "prevent_background_click" => $a_prevent_background_click,
130 "onclick" => $a_onclick, "ttip" => $a_ttip, "tt_my" => $a_tt_my, "tt_at" => $a_tt_at,
131 "tt_use_htmlspecialchars" => $a_tt_use_htmlspecialchars);
132 }

◆ flush()

ilAdvancedSelectionListGUI::flush ( )

Definition at line 154 of file class.ilAdvancedSelectionListGUI.php.

155 {
156 $this->items = array();
157 }

◆ getAccessKey()

ilAdvancedSelectionListGUI::getAccessKey ( )

Get access key.

Returns
integer access key function id

Definition at line 368 of file class.ilAdvancedSelectionListGUI.php.

References $access_key.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getAdditionalToggleElement()

ilAdvancedSelectionListGUI::getAdditionalToggleElement ( )

Get additional toggle element.

Returns
array

Definition at line 467 of file class.ilAdvancedSelectionListGUI.php.

References $toggle.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getAsynch()

ilAdvancedSelectionListGUI::getAsynch ( )

Get asynch mode.

Returns
boolean turn asynch mode on/off

Definition at line 492 of file class.ilAdvancedSelectionListGUI.php.

References $asynch.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getAsynchUrl()

ilAdvancedSelectionListGUI::getAsynchUrl ( )

Get asynch url.

Returns
string asynch url

Definition at line 512 of file class.ilAdvancedSelectionListGUI.php.

References $asynch_url.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getAutoHide()

ilAdvancedSelectionListGUI::getAutoHide ( )

Get auto hide.

Definition at line 400 of file class.ilAdvancedSelectionListGUI.php.

References $auto_hide.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getGroupedList()

ilAdvancedSelectionListGUI::getGroupedList ( )

Get Grouped List.

Returns
ilGroupedListGUI grouped list object

Definition at line 149 of file class.ilAdvancedSelectionListGUI.php.

References $grouped_list.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getHeaderIcon()

ilAdvancedSelectionListGUI::getHeaderIcon ( )

Get Header Icon.

Returns
string Header Icon

Definition at line 268 of file class.ilAdvancedSelectionListGUI.php.

269 {
270 return $this->headericon;
271 }

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getHTML()

ilAdvancedSelectionListGUI::getHTML (   $a_only_cmd_list_asynch = false)

Get selection list HTML.

Definition at line 556 of file class.ilAdvancedSelectionListGUI.php.

557 {
558 $items = $this->getItems();
559
560 // do not show list, if no item is in list
561 if (count($items) == 0 && !$this->getAsynch() && $this->getGroupedList() == null)
562 {
563 return "";
564 }
565
566 /* bootstrap made this obsolete ?!
567 include_once("./Services/YUI/classes/class.ilYuiUtil.php");
568 ilYuiUtil::initOverlay();
569 $GLOBALS["tpl"]->addJavascript("./Services/UIComponent/Overlay/js/ilOverlay.js");
570 */
571 $GLOBALS["tpl"]->addJavascript("./Services/UIComponent/AdvancedSelectionList/js/AdvancedSelectionList.js");
572
573 $tpl = new ilTemplate("tpl.adv_selection_list.html", true, true,
574 "Services/UIComponent/AdvancedSelectionList", "DEFAULT", false, true);
575
576 reset($items);
577
578 $cnt = 0;
579
580 if ($this->getAsynch())
581 {
582 $tpl->setCurrentBlock("asynch_request");
583 $tpl->setVariable("IMG_LOADER", ilUtil::getImagePath("loader.svg"));
584 $tpl->parseCurrentBlock();
585 }
586 else
587 {
588 if ($this->getGroupedList() != null)
589 {
590 $tpl->setVariable("GROUPED_LIST_HTML", $this->getGroupedList()->getHTML());
591 }
592 else
593 {
594 foreach($items as $item)
595 {
596 if (isset($item["ref_id"]))
597 {
598 $sel_arr[$item["ref_id"]] = (isset($item["title"]))
599 ? $item["title"]
600 : "";
601 }
602 $this->css_row = ($this->css_row != "tblrow1_mo")
603 ? "tblrow1_mo"
604 : "tblrow2_mo";
605
606 if ($this->getUseImages())
607 {
608 if ($item["img"])
609 {
610 $tpl->setCurrentBlock("image");
611 $tpl->setVariable("IMG_ITEM", $item["img"]);
612 $tpl->setVariable("ALT_ITEM", $item["alt"]);
613 $tpl->parseCurrentBlock();
614 }
615 else
616 {
617 $tpl->touchBlock("no_image");
618 }
619 }
620
621 if ($this->getOnClickMode() ==
623 $this->getItemLinkClass() != "")
624 {
625 if ($item["frame"])
626 {
627 $tpl->setCurrentBlock("frame");
628 $tpl->setVariable("TARGET_ITEM", $item["frame"]);
629 $tpl->parseCurrentBlock();
630 }
631
632 if ($this->getItemLinkClass() != "")
633 {
634 $tpl->setCurrentBlock("item_link_class");
635 $tpl->setVariable("ITEM_LINK_CLASS", $this->getItemLinkClass());
636 $tpl->parseCurrentBlock();
637 }
638
639 $tpl->setCurrentBlock("href_s");
640 $tpl->setVariable("HREF_ITEM",'href="'.$item["link"].'"');
641 $tpl->setVariable("ID_ITEM", $this->getId()."_".$item["value"]);
642 $tpl->parseCurrentBlock();
643
644 $tpl->touchBlock("href_e");
645
646 }
647
648 $tpl->setCurrentBlock("item");
649 if ($this->getOnClickMode() ==
651 {
652 if ($item["prevent_background_click"])
653 {
654 $tpl->setVariable("ONCLICK_ITEM",'');
655 }
656 else
657 {
658 if ($item["onclick"] == "")
659 {
660 $tpl->setVariable("ONCLICK_ITEM",
661 'onclick="'."return il.AdvancedSelectionList.openTarget('".$item["link"]."','".$item["frame"]."');".'"');
662 }
663 else
664 {
665 $tpl->setVariable("ONCLICK_ITEM",
666 'onclick="'."return ".$item["onclick"].";".'"');
667 }
668 }
669
670 }
671 else if ($this->getOnClickMode() ==
673 {
674 $tpl->setVariable("ONCLICK_ITEM",
675 'onclick="return il.AdvancedSelectionList.submitForm(\''.$this->getId().'\''.
676 ", '".$this->form_mode["select_name"]."','".$item["value"]."',".
677 "'".$this->on_click_form_id."','".$this->form_mode["button_cmd"]."');\"");
678 }
679 else if ($this->getOnClickMode() ==
681 {
682 $tpl->setVariable("ONCLICK_ITEM",
683 'onclick="return il.AdvancedSelectionList.selectForm(\''.$this->getId().'\''.
684 ", '".$this->form_mode["select_name"]."','".$item["value"]."',".
685 "'".$item["title"]."');\"");
686 }
687 else if ($this->getOnClickMode() ==
689 {
690 $tpl->setVariable("ONCLICK_ITEM",
691 'onclick="il.AdvancedSelectionList.clickNop(\''.$this->getId().'\''.
692 ", '".$this->form_mode["select_name"]."','".$item["value"]."',".
693 "'".$item["title"]."');\"");
694 }
695
696 $tpl->setVariable("CSS_ROW", $this->css_row);
697 if ($item["html"] == "")
698 {
699 $tpl->setVariable("TXT_ITEM", $item["title"]);
700 }
701 else
702 {
703 $tpl->setVariable("TXT_ITEM", $item["html"]);
704 }
705
706 $tpl->setVariable("ID_ITEM_TR", $this->getId()."_".$item["value"]."_tr");
707 if ($item["ttip"] != "")
708 {
709 include_once("./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php");
710 ilTooltipGUI::addTooltip($this->getId()."_".$item["value"]."_tr", $item["ttip"],
711 "", $item["tt_my"], $item["tt_at"], $item["tt_use_htmlspecialchars"]);
712 }
713
714 $tpl->parseCurrentBlock();
715
716 // add item to js object
717 $tpl->setCurrentBlock("js_item");
718 $tpl->setVariable("IT_ID", $this->getId());
719 $tpl->setVariable("IT_HID_NAME", $this->form_mode["select_name"]);
720 $tpl->setVariable("IT_HID_VAL", $item["value"]);
721 $tpl->setVariable("IT_TITLE", str_replace("'", "\\'", $item["title"]));
722 $tpl->parseCurrentBlock();
723 }
724
725 // output hidden input, if click mode is form submission
727 {
728 $tpl->setCurrentBlock("hidden_input");
729 $tpl->setVariable("HID", $this->getId());
730 $tpl->parseCurrentBlock();
731 }
732
733 // output hidden input and initialize
735 {
736 $tpl->setCurrentBlock("hidden_input");
737 $tpl->setVariable("HID", $this->getId());
738 $tpl->parseCurrentBlock();
739
740 // init hidden input with selected value
741 $tpl->setCurrentBlock("init_hidden_input");
742 $tpl->setVariable("H2ID", $this->getId());
743 $tpl->setVariable("HID_NAME", $this->form_mode["select_name"]);
744 $tpl->setVariable("HID_VALUE", $this->getSelectedValue());
745 $tpl->parseCurrentBlock();
746 }
747 }
748 }
749
750 if ($a_only_cmd_list_asynch)
751 {
752 $tpl->touchBlock("cmd_table");
753 return $tpl->get("cmd_table");
754 }
755
756 if ($this->getGroupedList() == null)
757 {
758 $tpl->setCurrentBlock("dd_content");
759 if ($this->getPullRight())
760 {
761 $tpl->setVariable("UL_CLASS", "dropdown-menu pull-right");
762 }
763 else
764 {
765 $tpl->setVariable("UL_CLASS", "dropdown-menu");
766 }
767 $tpl->setVariable("TABLE_ID", $this->getId());
768 $tpl->parseCurrentBlock();
769 }
770
772 {
773 $tpl->setCurrentBlock("top_img");
774 switch ($this->getHeaderIcon())
775 {
777 $tpl->setVariable("IMG_SPAN_STYLE", ilAdvancedSelectionListGUI::ICON_CONFIG);
778 break;
779
781 default:
782 $tpl->setVariable("IMG_SPAN_STYLE", ilAdvancedSelectionListGUI::ICON_ARROW);
783 break;
784 }
785 $tpl->parseCurrentBlock();
786 }
787
788
789 if($this->getAsynch())
790 {
791 $tpl->setCurrentBlock("asynch_bl");
792 $tpl->setVariable("ASYNCH_URL", $this->getAsynchUrl());
793 $tpl->setVariable("ASYNCH_ID", $this->getId());
794 $tpl->setVariable("ASYNCH_TRIGGER_ID", $this->getId());
795 $tpl->parseCurrentBlock();
796 }
797
798 // js section
799 $tpl->setCurrentBlock("js_section");
800 if ($this->getAccessKey() > 0)
801 {
802 include_once("./Services/Accessibility/classes/class.ilAccessKeyGUI.php");
803 $tpl->setVariable("ACCKEY", ilAccessKeyGUI::getAttribute($this->getAccessKey()));
804 }
805
806 $cfg["trigger_event"] = $this->getTriggerEvent();
807 $cfg["auto_hide"] = $this->getAutoHide();
808
809 if ($this->getSelectCallback() != "")
810 {
811 $cfg["select_callback"] = $this->getSelectCallback();
812 }
813 $cfg["anchor_id"] = "ilAdvSelListAnchorElement_".$this->getId();
814 $cfg["asynch"] = $this->getAsynch()
815 ? true
816 : false;
817 $cfg["asynch_url"] = $this->getAsynchUrl();
819 if (is_array($toggle))
820 {
821 $cfg["toggle_el"] = $toggle["el"];
822 $cfg["toggle_class_on"] = $toggle["class_on"];
823 }
824//echo "<br>".htmlentities($this->getAsynchUrl());
825 include_once("./Services/JSON/classes/class.ilJsonUtil.php");
826 $tpl->setVariable("CFG", ilJsonUtil::encode($cfg));
827
828 //echo htmlentities(ilJsonUtil::encode($cfg));
829
830 $tpl->setVariable("TXT_SEL_TOP", $this->getListTitle());
831 $tpl->setVariable("ID", $this->getId());
832
833 //$tpl->setVariable("CLASS_SEL_TOP", $this->getSelectionHeaderClass());
834 switch ($this->getStyle())
835 {
837 $tpl->setVariable("BTN_CLASS", "btn btn-sm btn-default");
838 $tpl->setVariable("TAG", "button");
839 break;
840
841 case self::STYLE_EMPH:
842 $tpl->setVariable("BTN_CLASS", "btn btn-sm btn-primary");
843 $tpl->setVariable("TAG", "button");
844 break;
845
847 $tpl->setVariable("BTN_CLASS", "btn btn-sm btn-link");
848 $tpl->setVariable("TAG", "button");
849 break;
850
851 case self::STYLE_LINK:
852 $tpl->setVariable("BTN_CLASS", "");
853 $tpl->setVariable("TAG", "a");
854 break;
855 }
856
857
858 if ($this->getSelectionHeaderSpanClass() != "")
859 {
860 $tpl->setVariable("CLASS_SEL_TOP_SPAN",
862 }
863
864 // set the async url to an extra template variable
865 // (needed for a mobile skin)
866 // $tpl->setVariable("ASYNC_URL", $this->getAsynchUrl());
867
868 $tpl->parseCurrentBlock();
869
870 return $tpl->get();
871 }
global $tpl
Definition: ilias.php:8
static getAttribute($a_func_id)
Get accesskey HTML attribute.
getAdditionalToggleElement()
Get additional toggle element.
getHTML($a_only_cmd_list_asynch=false)
Get selection list HTML.
getSelectionHeaderSpanClass()
Get selection header span class.
static encode($mixed, $suppress_native=false)
special template class to simplify handling of ITX/PEAR
static addTooltip($a_el_id, $a_text, $a_container="", $a_my="bottom center", $a_at="top center", $a_use_htmlspecialchars=true)
Adds a tooltip to an HTML element.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
Definition: CAS.php:276

References $GLOBALS, $items, $toggle, $tpl, ilTooltipGUI\addTooltip(), DOWN_ARROW_DARK, ilJsonUtil\encode(), getAccessKey(), getAdditionalToggleElement(), getAsynch(), getAsynchUrl(), ilAccessKeyGUI\getAttribute(), getAutoHide(), getGroupedList(), getHeaderIcon(), getHTML(), getId(), ilUtil\getImagePath(), getItemLinkClass(), getItems(), getListTitle(), getOnClickMode(), getPullRight(), getSelectCallback(), getSelectedValue(), getSelectionHeaderSpanClass(), getStyle(), getTriggerEvent(), getUseImages(), ICON_ARROW, ICON_CONFIG, NO_ICON, ON_ITEM_CLICK_FORM_SELECT, ON_ITEM_CLICK_FORM_SUBMIT, ON_ITEM_CLICK_HREF, ON_ITEM_CLICK_NOP, STYLE_DEFAULT, STYLE_EMPH, STYLE_LINK, and STYLE_LINK_BUTTON.

Referenced by getHTML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getId()

ilAdvancedSelectionListGUI::getId ( )

Get Id.

Returns
string Id

Definition at line 328 of file class.ilAdvancedSelectionListGUI.php.

References $id.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getItemLinkClass()

ilAdvancedSelectionListGUI::getItemLinkClass ( )

Get Item Link Class.

Returns
string Item Link Class

Definition at line 308 of file class.ilAdvancedSelectionListGUI.php.

309 {
310 return $this->itemlinkclass;
311 }

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getItems()

ilAdvancedSelectionListGUI::getItems ( )

Get items.

Returns
array array of items

Definition at line 164 of file class.ilAdvancedSelectionListGUI.php.

165 {
166 return $this->items;
167 }

References $items.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getListTitle()

ilAdvancedSelectionListGUI::getListTitle ( )

Get List Title.

Returns
string List Title

Definition at line 184 of file class.ilAdvancedSelectionListGUI.php.

185 {
186 return $this->listtitle;
187 }

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getNoJSLinkClass()

ilAdvancedSelectionListGUI::getNoJSLinkClass ( )

Get No Javascript Link Style Class.

Returns
string No Javascript Link Style Class

Definition at line 288 of file class.ilAdvancedSelectionListGUI.php.

289 {
290 return $this->nojslinkclass;
291 }

◆ getOnClickMode()

ilAdvancedSelectionListGUI::getOnClickMode ( )

Get "onClick"-Mode.

Returns

Definition at line 426 of file class.ilAdvancedSelectionListGUI.php.

427 {
428 return $this->on_click;
429 }

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getPullRight()

ilAdvancedSelectionListGUI::getPullRight ( )

Get pull right.

Returns
bool pull right

Definition at line 548 of file class.ilAdvancedSelectionListGUI.php.

References $dd_pullright.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getSelectCallback()

ilAdvancedSelectionListGUI::getSelectCallback ( )

Get select callback.

Definition at line 528 of file class.ilAdvancedSelectionListGUI.php.

529 {
530 return $this->select_callback;
531 }

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getSelectedValue()

ilAdvancedSelectionListGUI::getSelectedValue ( )

Get selected value.

Returns
string selected value

Definition at line 446 of file class.ilAdvancedSelectionListGUI.php.

References $selected_value.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getSelectionHeaderClass()

ilAdvancedSelectionListGUI::getSelectionHeaderClass ( )

Get Selection Header Class.

Returns
string Selection Header Class

Definition at line 206 of file class.ilAdvancedSelectionListGUI.php.

207 {
208 return $this->selectionheaderclass;
209 }

◆ getSelectionHeaderSpanClass()

ilAdvancedSelectionListGUI::getSelectionHeaderSpanClass ( )

Get selection header span class.

Returns
string header span class

Definition at line 248 of file class.ilAdvancedSelectionListGUI.php.

249 {
250 return $this->sel_head_span_class;
251 }

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getStyle()

ilAdvancedSelectionListGUI::getStyle ( )

Get style.

Returns
int button style STYLE_DEFAULT, STYLE_LINK, STYLE_EMPH

Definition at line 226 of file class.ilAdvancedSelectionListGUI.php.

References $style.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getTriggerEvent()

ilAdvancedSelectionListGUI::getTriggerEvent ( )

Get trigger event.

Definition at line 384 of file class.ilAdvancedSelectionListGUI.php.

References $trigger_event.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getUseImages()

ilAdvancedSelectionListGUI::getUseImages ( )

Get Use Images.

Returns
boolean Use Images

Definition at line 348 of file class.ilAdvancedSelectionListGUI.php.

349 {
350 return $this->useimages;
351 }

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ setAccessKey()

ilAdvancedSelectionListGUI::setAccessKey (   $a_val)

Set access key.

Parameters
integeraccess function id

Definition at line 358 of file class.ilAdvancedSelectionListGUI.php.

359 {
360 $this->access_key = $a_val;
361 }

◆ setAdditionalToggleElement()

ilAdvancedSelectionListGUI::setAdditionalToggleElement (   $a_el,
  $a_on 
)

Set additional toggle element.

Parameters
stringelement id
stringclass for "on"

Definition at line 457 of file class.ilAdvancedSelectionListGUI.php.

458 {
459 $this->toggle = array("el" => $a_el, "class_on" => $a_on);
460 }

◆ setAsynch()

ilAdvancedSelectionListGUI::setAsynch (   $a_val)

Set asynch mode (this is set to true, if list should get items asynchronously)

Parameters
booleanturn asynch mode on/off

Definition at line 477 of file class.ilAdvancedSelectionListGUI.php.

478 {
479 if ($a_val)
480 {
481 include_once("./Services/YUI/classes/class.ilYuiUtil.php");
483 }
484 $this->asynch = $a_val;
485 }
static initConnection()
Init YUI Connection module.

References ilYuiUtil\initConnection().

+ Here is the call graph for this function:

◆ setAsynchUrl()

ilAdvancedSelectionListGUI::setAsynchUrl (   $a_val)

Set asynch url.

Parameters
stringasynch url

Definition at line 502 of file class.ilAdvancedSelectionListGUI.php.

503 {
504 $this->asynch_url = $a_val;
505 }

◆ setAutoHide()

ilAdvancedSelectionListGUI::setAutoHide (   $a_val)

Set auto hide.

Definition at line 392 of file class.ilAdvancedSelectionListGUI.php.

393 {
394 $this->auto_hide = $a_val;
395 }

◆ setFormSelectMode()

ilAdvancedSelectionListGUI::setFormSelectMode (   $a_select_name,
  $a_select_class = "",
  $a_include_form_tag = false,
  $a_form_action = "",
  $a_form_id = "",
  $a_form_class = "",
  $a_form_target = "_top",
  $a_button_text = "",
  $a_button_class = "",
  $a_button_cmd = "" 
)

Set form mode (for no js fallback)

Outputs form selection including sourrounding form

Definition at line 92 of file class.ilAdvancedSelectionListGUI.php.

96 {
98 $this->form_mode = array(
99 "select_name" => $a_select_name,
100 "select_class" => $a_select_class,
101 "include_form_tag" => $a_include_form_tag,
102 "form_action" => $a_form_action,
103 "form_id" => $a_form_id,
104 "form_class" => $a_form_class,
105 "form_target" => $a_form_target,
106 "button_text" => $a_button_text,
107 "button_class" => $a_button_class,
108 "button_cmd" => $a_button_cmd
109 );
110 }

References MODE_FORM_SELECT.

◆ setGroupedList()

ilAdvancedSelectionListGUI::setGroupedList (   $a_val)

Set Grouped List.

Parameters
ilGroupedListGUI$a_valgrouped list object

Definition at line 139 of file class.ilAdvancedSelectionListGUI.php.

140 {
141 $this->grouped_list = $a_val;
142 }

◆ setHeaderIcon()

ilAdvancedSelectionListGUI::setHeaderIcon (   $a_headericon)

Set Header Icon.

Parameters
string$a_headericonHeader Icon

Definition at line 258 of file class.ilAdvancedSelectionListGUI.php.

259 {
260 $this->headericon = $a_headericon;
261 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setId()

ilAdvancedSelectionListGUI::setId (   $a_id)

Set Id.

Parameters
string$a_idId

Definition at line 318 of file class.ilAdvancedSelectionListGUI.php.

319 {
320 $this->id = $a_id;
321 }

◆ setItemLinkClass()

ilAdvancedSelectionListGUI::setItemLinkClass (   $a_itemlinkclass)

Set Item Link Class.

Parameters
string$a_itemlinkclassItem Link Class

Definition at line 298 of file class.ilAdvancedSelectionListGUI.php.

299 {
300 $this->itemlinkclass = $a_itemlinkclass;
301 }

◆ setLinksMode()

ilAdvancedSelectionListGUI::setLinksMode (   $a_link_class = "")

Set links mode (for no js fallback)

Definition at line 80 of file class.ilAdvancedSelectionListGUI.php.

81 {
83 $this->links_mode = array(
84 "link_class" => $a_link_class);
85 }

References MODE_LINKS.

◆ setListTitle()

ilAdvancedSelectionListGUI::setListTitle (   $a_listtitle)

Set List Title.

Parameters
string$a_listtitleList Title

Definition at line 174 of file class.ilAdvancedSelectionListGUI.php.

175 {
176 $this->listtitle = $a_listtitle;
177 }

◆ setNoJSLinkClass()

ilAdvancedSelectionListGUI::setNoJSLinkClass (   $a_nojslinkclass)

Set No Javascript Link Style Class.

Parameters
string$a_nojslinkclassNo Javascript Link Style Class

Definition at line 278 of file class.ilAdvancedSelectionListGUI.php.

279 {
280 $this->nojslinkclass = $a_nojslinkclass;
281 }

◆ setOnClickMode()

ilAdvancedSelectionListGUI::setOnClickMode (   $a_val,
  $a_onclick_form_id = "" 
)

Set "onClick"- Mode.

Valid values are: ilAdvancedSelectionList::ON_ITEM_CLICK_HREF or ilAdvancedSelectionList::ON_ITEM_CLICK_FORM_SUBMIT ilAdvancedSelectionList::ON_ITEM_CLICK_FORM_SELECT

Parameters
stringmode

Definition at line 415 of file class.ilAdvancedSelectionListGUI.php.

416 {
417 $this->on_click = $a_val;
418 $this->on_click_form_id = $a_onclick_form_id;
419 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setPullRight()

ilAdvancedSelectionListGUI::setPullRight (   $a_val)

Set pull right.

Parameters
bool$a_valpull right

Definition at line 538 of file class.ilAdvancedSelectionListGUI.php.

539 {
540 $this->dd_pullright = $a_val;
541 }

◆ setSelectCallback()

ilAdvancedSelectionListGUI::setSelectCallback (   $a_val)

Set select callback.

Definition at line 520 of file class.ilAdvancedSelectionListGUI.php.

521 {
522 $this->select_callback = $a_val;
523 }

◆ setSelectedValue()

ilAdvancedSelectionListGUI::setSelectedValue (   $a_val)

Set selected value.

Parameters
stringselected value

Definition at line 436 of file class.ilAdvancedSelectionListGUI.php.

437 {
438 $this->selected_value = $a_val;
439 }

◆ setSelectionHeaderClass()

ilAdvancedSelectionListGUI::setSelectionHeaderClass (   $a_selectionheaderclass)

Set Selection Header Class.

DEPRECATED use set style instead

Parameters
string$a_selectionheaderclassSelection Header Class

Definition at line 196 of file class.ilAdvancedSelectionListGUI.php.

197 {
198 $this->selectionheaderclass = $a_selectionheaderclass;
199 }

◆ setSelectionHeaderSpanClass()

ilAdvancedSelectionListGUI::setSelectionHeaderSpanClass (   $a_val)

Set selection header span class.

Parameters
string$a_valheader span class

Definition at line 238 of file class.ilAdvancedSelectionListGUI.php.

239 {
240 $this->sel_head_span_class = $a_val;
241 }

◆ setStyle()

ilAdvancedSelectionListGUI::setStyle (   $a_val)

Set style.

Parameters
int$a_valbutton style STYLE_DEFAULT, STYLE_LINK, STYLE_EMPH

Definition at line 216 of file class.ilAdvancedSelectionListGUI.php.

217 {
218 $this->style = $a_val;
219 }

◆ setTriggerEvent()

ilAdvancedSelectionListGUI::setTriggerEvent (   $a_val)

Set trigger event.

Definition at line 376 of file class.ilAdvancedSelectionListGUI.php.

377 {
378 $this->trigger_event = $a_val;
379 }

◆ setUseImages()

ilAdvancedSelectionListGUI::setUseImages (   $a_useimages)

Set Use Images.

Parameters
boolean$a_useimagesUse Images

Definition at line 338 of file class.ilAdvancedSelectionListGUI.php.

339 {
340 $this->useimages = $a_useimages;
341 }

Field Documentation

◆ $access_key

ilAdvancedSelectionListGUI::$access_key = false
protected

Definition at line 36 of file class.ilAdvancedSelectionListGUI.php.

Referenced by getAccessKey().

◆ $asynch

ilAdvancedSelectionListGUI::$asynch = false
private

Definition at line 15 of file class.ilAdvancedSelectionListGUI.php.

Referenced by getAsynch().

◆ $asynch_url

ilAdvancedSelectionListGUI::$asynch_url = false
protected

Definition at line 38 of file class.ilAdvancedSelectionListGUI.php.

Referenced by getAsynchUrl().

◆ $auto_hide

ilAdvancedSelectionListGUI::$auto_hide = false
protected

Definition at line 41 of file class.ilAdvancedSelectionListGUI.php.

Referenced by getAutoHide().

◆ $css_row

ilAdvancedSelectionListGUI::$css_row = ""
protected

Definition at line 35 of file class.ilAdvancedSelectionListGUI.php.

◆ $dd_pullright

ilAdvancedSelectionListGUI::$dd_pullright = true
private

Definition at line 44 of file class.ilAdvancedSelectionListGUI.php.

Referenced by getPullRight().

◆ $grouped_list

ilAdvancedSelectionListGUI::$grouped_list = null
protected

Definition at line 42 of file class.ilAdvancedSelectionListGUI.php.

Referenced by getGroupedList().

◆ $id

ilAdvancedSelectionListGUI::$id = "asl"
private

Definition at line 14 of file class.ilAdvancedSelectionListGUI.php.

Referenced by getId().

◆ $items

ilAdvancedSelectionListGUI::$items = array()
private

Definition at line 13 of file class.ilAdvancedSelectionListGUI.php.

Referenced by getHTML(), and getItems().

◆ $selected_value

ilAdvancedSelectionListGUI::$selected_value = ""
protected

Definition at line 39 of file class.ilAdvancedSelectionListGUI.php.

Referenced by getSelectedValue().

◆ $style

ilAdvancedSelectionListGUI::$style = 0
protected

Definition at line 43 of file class.ilAdvancedSelectionListGUI.php.

Referenced by getStyle().

◆ $toggle

ilAdvancedSelectionListGUI::$toggle = false
protected

Definition at line 37 of file class.ilAdvancedSelectionListGUI.php.

Referenced by getAdditionalToggleElement(), and getHTML().

◆ $trigger_event

ilAdvancedSelectionListGUI::$trigger_event = "click"
protected

Definition at line 40 of file class.ilAdvancedSelectionListGUI.php.

Referenced by getTriggerEvent().

◆ DOWN_ARROW_DARK

◆ ICON_ARROW

const ilAdvancedSelectionListGUI::ICON_ARROW = "caret"

Definition at line 18 of file class.ilAdvancedSelectionListGUI.php.

Referenced by getHTML(), and ilMainMenuGUI\renderDropDown().

◆ ICON_CONFIG

const ilAdvancedSelectionListGUI::ICON_CONFIG = "glyphicon glyphicon-cog"

Definition at line 19 of file class.ilAdvancedSelectionListGUI.php.

Referenced by ilBlockGUI\fillHeaderCommands(), and getHTML().

◆ MODE_FORM_SELECT

const ilAdvancedSelectionListGUI::MODE_FORM_SELECT = "select"

Definition at line 23 of file class.ilAdvancedSelectionListGUI.php.

Referenced by setFormSelectMode().

◆ MODE_LINKS

const ilAdvancedSelectionListGUI::MODE_LINKS = "links"

Definition at line 22 of file class.ilAdvancedSelectionListGUI.php.

Referenced by __construct(), and setLinksMode().

◆ NO_ICON

const ilAdvancedSelectionListGUI::NO_ICON = ""

Definition at line 20 of file class.ilAdvancedSelectionListGUI.php.

Referenced by getHTML(), and ilNavigationHistoryGUI\getHTML().

◆ ON_ITEM_CLICK_FORM_SELECT

const ilAdvancedSelectionListGUI::ON_ITEM_CLICK_FORM_SELECT = "select"

◆ ON_ITEM_CLICK_FORM_SUBMIT

const ilAdvancedSelectionListGUI::ON_ITEM_CLICK_FORM_SUBMIT = "submit"

Definition at line 26 of file class.ilAdvancedSelectionListGUI.php.

Referenced by getHTML().

◆ ON_ITEM_CLICK_HREF

const ilAdvancedSelectionListGUI::ON_ITEM_CLICK_HREF = "href"

Definition at line 25 of file class.ilAdvancedSelectionListGUI.php.

Referenced by __construct(), and getHTML().

◆ ON_ITEM_CLICK_NOP

const ilAdvancedSelectionListGUI::ON_ITEM_CLICK_NOP = "nop"

◆ STYLE_DEFAULT

const ilAdvancedSelectionListGUI::STYLE_DEFAULT = 0

Definition at line 30 of file class.ilAdvancedSelectionListGUI.php.

Referenced by getHTML().

◆ STYLE_EMPH

const ilAdvancedSelectionListGUI::STYLE_EMPH = 2

◆ STYLE_LINK

const ilAdvancedSelectionListGUI::STYLE_LINK = 1

◆ STYLE_LINK_BUTTON

const ilAdvancedSelectionListGUI::STYLE_LINK_BUTTON = 3

The documentation for this class was generated from the following file: