ILIAS  release_7 Revision v7.30-3-g800a261c036
ilAdvancedSelectionListGUI Class Reference

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

+ Inheritance diagram for ilAdvancedSelectionListGUI:
+ 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, $a_data=array())
 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...
 
 setAriaListTitle ($a_listtitle)
 Set List Title. More...
 
 getAriaListTitle ()
 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...
 
 getToolbarHTML ()
 
 getHTML ($a_only_cmd_list_asynch=false)
 Get selection list HTML. More...
 
 getToolbarHTML ()
 Get input item HTML to be inserted into ilToolbarGUI. 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
 
 $listtitle
 
 $aria_listtitle
 

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 ( )

Constructor.

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

References $DIC, DOWN_ARROW_DARK, MODE_LINKS, ON_ITEM_CLICK_HREF, setHeaderIcon(), and setOnClickMode().

+ Here is the call graph for this function:

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,
  $a_data = array() 
)

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 136 of file class.ilAdvancedSelectionListGUI.php.

151 {
152 $this->items[] = array("title" => $a_title, "value" => $a_value,
153 "link" => $a_link, "img" => $a_img, "alt" => $a_alt, "frame" => $a_frame,
154 "html" => $a_html, "prevent_background_click" => $a_prevent_background_click,
155 "onclick" => $a_onclick, "ttip" => $a_ttip, "tt_my" => $a_tt_my, "tt_at" => $a_tt_at,
156 "tt_use_htmlspecialchars" => $a_tt_use_htmlspecialchars, "data" => $a_data);
157 }

Referenced by ilSystemStylesTableGUI\addManagementActionsToList(), and ilFileNewsRendererGUI\addTimelineActions().

+ Here is the caller graph for this function:

◆ flush()

ilAdvancedSelectionListGUI::flush ( )

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

180 {
181 $this->items = array();
182 }

◆ getAccessKey()

ilAdvancedSelectionListGUI::getAccessKey ( )

Get access key.

Returns
integer access key function id

Definition at line 413 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 512 of file class.ilAdvancedSelectionListGUI.php.

References $toggle.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getAriaListTitle()

ilAdvancedSelectionListGUI::getAriaListTitle ( )

Get List Title.

Returns
string List Title

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

230 {
231 return strip_tags($this->aria_listtitle);
232 }

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 536 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 556 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 445 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 174 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 313 of file class.ilAdvancedSelectionListGUI.php.

314 {
315 return $this->headericon;
316 }

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 609 of file class.ilAdvancedSelectionListGUI.php.

610 {
611 $items = $this->getItems();
612
613 // do not show list, if no item is in list
614 if (count($items) == 0 && !$this->getAsynch() && $this->getGroupedList() == null) {
615 return "";
616 }
617
618 /* bootstrap made this obsolete ?!
619 include_once("./Services/YUI/classes/class.ilYuiUtil.php");
620 ilYuiUtil::initOverlay();
621 $GLOBALS["tpl"]->addJavascript("./Services/UIComponent/Overlay/js/ilOverlay.js");
622 */
623 $GLOBALS["tpl"]->addJavascript("./Services/UIComponent/AdvancedSelectionList/js/AdvancedSelectionList.js");
624
625 $tpl = new ilTemplate(
626 "tpl.adv_selection_list.html",
627 true,
628 true,
629 "Services/UIComponent/AdvancedSelectionList",
630 "DEFAULT",
631 false,
632 true
633 );
634
635 reset($items);
636
637 $cnt = 0;
638
639 if ($this->getAsynch()) {
640 $tpl->setCurrentBlock("asynch_request");
641 $tpl->setVariable("IMG_LOADER", ilUtil::getImagePath("loader.svg"));
642 $tpl->parseCurrentBlock();
643 } else {
644 if ($this->getGroupedList() != null) {
645 $tpl->setVariable("GROUPED_LIST_HTML", $this->getGroupedList()->getHTML());
646 } else {
647 foreach ($items as $item) {
648 $item["value"] = htmlspecialchars($item["value"], ENT_QUOTES);
649 if (isset($item["ref_id"])) {
650 $sel_arr[$item["ref_id"]] = (isset($item["title"]))
651 ? $item["title"]
652 : "";
653 }
654 $this->css_row = ($this->css_row != "tblrow1_mo")
655 ? "tblrow1_mo"
656 : "tblrow2_mo";
657
658 if ($this->getUseImages()) {
659 if ($item["img"]) {
660 $tpl->setCurrentBlock("image");
661 $tpl->setVariable("IMG_ITEM", $item["img"]);
662 $tpl->setVariable("ALT_ITEM", $item["alt"]);
663 $tpl->parseCurrentBlock();
664 } else {
665 $tpl->touchBlock("no_image");
666 }
667 }
668
669 if ($this->getOnClickMode() ==
671 $this->getItemLinkClass() != "") {
672 if ($item["frame"]) {
673 $tpl->setCurrentBlock("frame");
674 $tpl->setVariable("TARGET_ITEM", $item["frame"]);
675 $tpl->parseCurrentBlock();
676 }
677
678 if ($this->getItemLinkClass() != "") {
679 $tpl->setCurrentBlock("item_link_class");
680 $tpl->setVariable("ITEM_LINK_CLASS", $this->getItemLinkClass());
681 $tpl->parseCurrentBlock();
682 }
683
684 if (is_array($item["data"])) {
685 foreach ($item["data"] as $k => $v) {
686 $tpl->setCurrentBlock("f_data");
687 $tpl->setVariable("DATA_KEY", $k);
688 $tpl->setVariable("DATA_VAL", ilUtil::prepareFormOutput($v));
689 $tpl->parseCurrentBlock();
690 }
691 }
692 if ($item["value"] != "") {
693 $tpl->setCurrentBlock("item_id");
694 $tpl->setVariable("ID_ITEM", $this->getId() . "_" . $item["value"]);
695 $tpl->parseCurrentBlock();
696 }
697
698 $tpl->setCurrentBlock("href_s");
699 $tpl->setVariable("HREF_ITEM", 'href="' . $item["link"] . '"');
700 $tpl->parseCurrentBlock();
701
702 $tpl->touchBlock("href_e");
703 }
704
705 $tpl->setCurrentBlock("item");
706 if ($this->getOnClickMode() ==
708 if ($item["prevent_background_click"]) {
709 $tpl->setVariable("ONCLICK_ITEM", '');
710 } else {
711 if ($item["onclick"] == "" && $item["frame"] != "") { // see #28730
712 $tpl->setVariable(
713 "ONCLICK_ITEM",
714 'onclick="' . "return il.AdvancedSelectionList.openTarget('" . $item["link"] . "','" . $item["frame"] . "');" . '"'
715 );
716 } elseif ($item["onclick"] != "") {
717 $tpl->setVariable(
718 "ONCLICK_ITEM",
719 'onclick="' . "return " . $item["onclick"] . ";" . '"'
720 );
721 }
722 }
723 } elseif ($this->getOnClickMode() ==
725 $tpl->setVariable(
726 "ONCLICK_ITEM",
727 'onclick="return il.AdvancedSelectionList.submitForm(\'' . $this->getId() . '\'' .
728 ", '" . $this->form_mode["select_name"] . "','" . $item["value"] . "'," .
729 "'" . $this->on_click_form_id . "','" . $this->form_mode["button_cmd"] . "');\""
730 );
731 } elseif ($this->getOnClickMode() ==
733 $tpl->setVariable(
734 "ONCLICK_ITEM",
735 'onclick="return il.AdvancedSelectionList.selectForm(\'' . $this->getId() . '\'' .
736 ", '" . $this->form_mode["select_name"] . "','" . $item["value"] . "'," .
737 "'" . $item["title"] . "');\""
738 );
739 } elseif ($this->getOnClickMode() ==
741 $tpl->setVariable(
742 "ONCLICK_ITEM",
743 'onclick="il.AdvancedSelectionList.clickNop(\'' . $this->getId() . '\'' .
744 ", '" . $this->form_mode["select_name"] . "','" . $item["value"] . "'," .
745 "'" . $item["title"] . "');\""
746 );
747 }
748
749 $tpl->setVariable("CSS_ROW", $this->css_row);
750 if ($item["html"] == "") {
751 $tpl->setVariable("TXT_ITEM", $item["title"]);
752 } else {
753 $tpl->setVariable("TXT_ITEM", $item["html"]);
754 }
755
756 $tpl->setVariable("ID_ITEM_TR", $this->getId() . "_" . $item["value"] . "_tr");
757 if ($item["ttip"] != "") {
758 include_once("./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php");
760 $this->getId() . "_" . $item["value"] . "_tr",
761 $item["ttip"],
762 "",
763 $item["tt_my"],
764 $item["tt_at"],
765 $item["tt_use_htmlspecialchars"]
766 );
767 }
768
769 $tpl->parseCurrentBlock();
770
771 // add item to js object
772 $tpl->setCurrentBlock("js_item");
773 $tpl->setVariable("IT_ID", $this->getId());
774 $tpl->setVariable("IT_HID_NAME", $this->form_mode["select_name"]);
775 $tpl->setVariable("IT_HID_VAL", $item["value"]);
776 $tpl->setVariable("IT_TITLE", str_replace("'", "\\'", $item["title"]));
777 $tpl->parseCurrentBlock();
778 }
779
780 // output hidden input, if click mode is form submission
782 $tpl->setCurrentBlock("hidden_input");
783 $tpl->setVariable("HID", $this->getId());
784 $tpl->parseCurrentBlock();
785 }
786
787 // output hidden input and initialize
789 $tpl->setCurrentBlock("hidden_input");
790 $tpl->setVariable("HID", $this->getId());
791 $tpl->parseCurrentBlock();
792
793 // init hidden input with selected value
794 $tpl->setCurrentBlock("init_hidden_input");
795 $tpl->setVariable("H2ID", $this->getId());
796 $tpl->setVariable("HID_NAME", $this->form_mode["select_name"]);
797 $tpl->setVariable("HID_VALUE", $this->getSelectedValue());
798 $tpl->parseCurrentBlock();
799 }
800 }
801 }
802
803 if ($a_only_cmd_list_asynch) {
804 $tpl->touchBlock("cmd_table");
805 return $tpl->get("cmd_table");
806 }
807
808 if ($this->getGroupedList() == null) {
809 $tpl->setCurrentBlock("dd_content");
810 if ($this->getPullRight()) {
811 $tpl->setVariable("UL_CLASS", "dropdown-menu pull-right");
812 } else {
813 $tpl->setVariable("UL_CLASS", "dropdown-menu");
814 }
815 $tpl->setVariable("TABLE_ID", $this->getId());
816 $tpl->parseCurrentBlock();
817 }
818
820 $tpl->setCurrentBlock("top_img");
821 switch ($this->getHeaderIcon()) {
823 $tpl->setVariable("IMG_SPAN_STYLE", ilAdvancedSelectionListGUI::ICON_CONFIG);
824 break;
825
827 default:
828 $tpl->setVariable("IMG_SPAN_STYLE", ilAdvancedSelectionListGUI::ICON_ARROW);
829 break;
830 }
831 $tpl->parseCurrentBlock();
832 }
833
834
835 if ($this->getAsynch()) {
836 $tpl->setCurrentBlock("asynch_bl");
837 $tpl->setVariable("ASYNCH_URL", $this->getAsynchUrl());
838 $tpl->setVariable("ASYNCH_ID", $this->getId());
839 $tpl->setVariable("ASYNCH_TRIGGER_ID", $this->getId());
840 $tpl->parseCurrentBlock();
841 }
842
843 // js section
844 $tpl->setCurrentBlock("js_section");
845 if ($this->getAccessKey() > 0) {
846 include_once("./Services/Accessibility/classes/class.ilAccessKeyGUI.php");
847 $tpl->setVariable("ACCKEY", ilAccessKeyGUI::getAttribute($this->getAccessKey()));
848 }
849
850 $cfg["trigger_event"] = $this->getTriggerEvent();
851 $cfg["auto_hide"] = $this->getAutoHide();
852
853 if ($this->getSelectCallback() != "") {
854 $cfg["select_callback"] = $this->getSelectCallback();
855 }
856 $cfg["anchor_id"] = "ilAdvSelListAnchorElement_" . $this->getId();
857 $cfg["asynch"] = $this->getAsynch()
858 ? true
859 : false;
860 $cfg["asynch_url"] = $this->getAsynchUrl();
862 if (is_array($toggle)) {
863 $cfg["toggle_el"] = $toggle["el"];
864 $cfg["toggle_class_on"] = $toggle["class_on"];
865 }
866 //echo "<br>".htmlentities($this->getAsynchUrl());
867 include_once("./Services/JSON/classes/class.ilJsonUtil.php");
868 $tpl->setVariable("CFG", ilJsonUtil::encode($cfg));
869
870 //echo htmlentities(ilJsonUtil::encode($cfg));
871
872 $tpl->setVariable("TXT_SEL_TOP", $this->getListTitle());
873 if ($this->getListTitle() == "" || $this->getAriaListTitle() != "") {
874 $aria_title = ($this->getAriaListTitle() != "")
875 ? $this->getAriaListTitle()
876 : $this->lng->txt("actions");
877 $tpl->setVariable("TXT_ARIA_TOP", $aria_title);
878 }
879 $tpl->setVariable("ID", $this->getId());
880
881 //$tpl->setVariable("CLASS_SEL_TOP", $this->getSelectionHeaderClass());
882 switch ($this->getStyle()) {
884 $tpl->setVariable("BTN_CLASS", "btn btn-default");
885 $tpl->setVariable("TAG", "button");
886 break;
887
888 case self::STYLE_EMPH:
889 $tpl->setVariable("BTN_CLASS", "btn btn-primary");
890 $tpl->setVariable("TAG", "button");
891 break;
892
894 $tpl->setVariable("BTN_CLASS", "btn btn-link");
895 $tpl->setVariable("TAG", "button");
896 break;
897
898 case self::STYLE_LINK:
899 $tpl->setVariable("BTN_CLASS", "");
900 $tpl->setVariable("TAG", "a");
901 $tpl->touchBlock("href_link");
902 break;
903 }
904
905
906 if ($this->getSelectionHeaderSpanClass() != "") {
907 $tpl->setVariable(
908 "CLASS_SEL_TOP_SPAN",
910 );
911 }
912
913 // set the async url to an extra template variable
914 // (needed for a mobile skin)
915 // $tpl->setVariable("ASYNC_URL", $this->getAsynchUrl());
916
917 $tpl->parseCurrentBlock();
918
919 return $tpl->get();
920 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
return true
Flag indicating whether or not HTTP headers will be sent when outputting captcha image/audio.
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)
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41

References $GLOBALS, $items, $toggle, $tpl, ilTooltipGUI\addTooltip(), DOWN_ARROW_DARK, ilJsonUtil\encode(), getAccessKey(), getAdditionalToggleElement(), getAriaListTitle(), 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, ilUtil\prepareFormOutput(), STYLE_DEFAULT, STYLE_EMPH, STYLE_LINK, STYLE_LINK_BUTTON, and true.

Referenced by getHTML(), and getToolbarHTML().

+ 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 373 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 353 of file class.ilAdvancedSelectionListGUI.php.

354 {
355 return $this->itemlinkclass;
356 }

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getItems()

ilAdvancedSelectionListGUI::getItems ( )

Get items.

Returns
array array of items

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

190 {
191 return $this->items;
192 }

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 209 of file class.ilAdvancedSelectionListGUI.php.

References $listtitle.

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 333 of file class.ilAdvancedSelectionListGUI.php.

334 {
335 return $this->nojslinkclass;
336 }

◆ getOnClickMode()

ilAdvancedSelectionListGUI::getOnClickMode ( )

Get "onClick"-Mode.

Returns

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

472 {
473 return $this->on_click;
474 }

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getPullRight()

ilAdvancedSelectionListGUI::getPullRight ( )

Get pull right.

Returns
bool pull right

Definition at line 592 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 572 of file class.ilAdvancedSelectionListGUI.php.

573 {
574 return $this->select_callback;
575 }

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getSelectedValue()

ilAdvancedSelectionListGUI::getSelectedValue ( )

Get selected value.

Returns
string selected value

Definition at line 491 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 251 of file class.ilAdvancedSelectionListGUI.php.

252 {
253 return $this->selectionheaderclass;
254 }

◆ getSelectionHeaderSpanClass()

ilAdvancedSelectionListGUI::getSelectionHeaderSpanClass ( )

Get selection header span class.

Returns
string header span class

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

294 {
295 return $this->sel_head_span_class;
296 }

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 271 of file class.ilAdvancedSelectionListGUI.php.

References $style.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getToolbarHTML()

ilAdvancedSelectionListGUI::getToolbarHTML ( )
Returns
string

Implements ilToolbarItem.

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

602 {
603 return $this->getHTML();
604 }

References getHTML().

+ Here is the call graph for this function:

◆ getTriggerEvent()

ilAdvancedSelectionListGUI::getTriggerEvent ( )

Get trigger event.

Definition at line 429 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 393 of file class.ilAdvancedSelectionListGUI.php.

394 {
395 return $this->useimages;
396 }

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 403 of file class.ilAdvancedSelectionListGUI.php.

404 {
405 $this->access_key = $a_val;
406 }

◆ setAdditionalToggleElement()

ilAdvancedSelectionListGUI::setAdditionalToggleElement (   $a_el,
  $a_on 
)

Set additional toggle element.

Parameters
stringelement id
stringclass for "on"

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

503 {
504 $this->toggle = array("el" => $a_el, "class_on" => $a_on);
505 }

◆ setAriaListTitle()

ilAdvancedSelectionListGUI::setAriaListTitle (   $a_listtitle)

Set List Title.

Parameters
string$a_listtitleList Title

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

220 {
221 $this->aria_listtitle = $a_listtitle;
222 }

◆ 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 522 of file class.ilAdvancedSelectionListGUI.php.

523 {
524 if ($a_val) {
525 include_once("./Services/YUI/classes/class.ilYuiUtil.php");
527 }
528 $this->asynch = $a_val;
529 }
static initConnection(ilGlobalTemplateInterface $a_main_tpl=null)
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 546 of file class.ilAdvancedSelectionListGUI.php.

547 {
548 $this->asynch_url = $a_val;
549 }

◆ setAutoHide()

ilAdvancedSelectionListGUI::setAutoHide (   $a_val)

Set auto hide.

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

438 {
439 $this->auto_hide = $a_val;
440 }

◆ 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 98 of file class.ilAdvancedSelectionListGUI.php.

109 {
111 $this->form_mode = array(
112 "select_name" => $a_select_name,
113 "select_class" => $a_select_class,
114 "include_form_tag" => $a_include_form_tag,
115 "form_action" => $a_form_action,
116 "form_id" => $a_form_id,
117 "form_class" => $a_form_class,
118 "form_target" => $a_form_target,
119 "button_text" => $a_button_text,
120 "button_class" => $a_button_class,
121 "button_cmd" => $a_button_cmd
122 );
123 }

References MODE_FORM_SELECT.

◆ setGroupedList()

ilAdvancedSelectionListGUI::setGroupedList (   $a_val)

Set Grouped List.

Parameters
ilGroupedListGUI$a_valgrouped list object

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

165 {
166 $this->grouped_list = $a_val;
167 }

◆ setHeaderIcon()

ilAdvancedSelectionListGUI::setHeaderIcon (   $a_headericon)

Set Header Icon.

Parameters
string$a_headericonHeader Icon

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

304 {
305 $this->headericon = $a_headericon;
306 }

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 363 of file class.ilAdvancedSelectionListGUI.php.

364 {
365 $this->id = $a_id;
366 }

◆ setItemLinkClass()

ilAdvancedSelectionListGUI::setItemLinkClass (   $a_itemlinkclass)

Set Item Link Class.

Parameters
string$a_itemlinkclassItem Link Class

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

344 {
345 $this->itemlinkclass = $a_itemlinkclass;
346 }

◆ setLinksMode()

ilAdvancedSelectionListGUI::setLinksMode (   $a_link_class = "")

Set links mode (for no js fallback)

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

87 {
89 $this->links_mode = array(
90 "link_class" => $a_link_class);
91 }

References MODE_LINKS.

◆ setListTitle()

ilAdvancedSelectionListGUI::setListTitle (   $a_listtitle)

Set List Title.

Parameters
string$a_listtitleList Title

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

200 {
201 $this->listtitle = $a_listtitle;
202 }

◆ setNoJSLinkClass()

ilAdvancedSelectionListGUI::setNoJSLinkClass (   $a_nojslinkclass)

Set No Javascript Link Style Class.

Parameters
string$a_nojslinkclassNo Javascript Link Style Class

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

324 {
325 $this->nojslinkclass = $a_nojslinkclass;
326 }

◆ 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 460 of file class.ilAdvancedSelectionListGUI.php.

461 {
462 $this->on_click = $a_val;
463 $this->on_click_form_id = $a_onclick_form_id;
464 }

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 582 of file class.ilAdvancedSelectionListGUI.php.

583 {
584 $this->dd_pullright = $a_val;
585 }

◆ setSelectCallback()

ilAdvancedSelectionListGUI::setSelectCallback (   $a_val)

Set select callback.

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

565 {
566 $this->select_callback = $a_val;
567 }

◆ setSelectedValue()

ilAdvancedSelectionListGUI::setSelectedValue (   $a_val)

Set selected value.

Parameters
stringselected value

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

482 {
483 $this->selected_value = $a_val;
484 }

◆ setSelectionHeaderClass()

ilAdvancedSelectionListGUI::setSelectionHeaderClass (   $a_selectionheaderclass)

Set Selection Header Class.

DEPRECATED use set style instead

Parameters
string$a_selectionheaderclassSelection Header Class

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

242 {
243 $this->selectionheaderclass = $a_selectionheaderclass;
244 }

◆ setSelectionHeaderSpanClass()

ilAdvancedSelectionListGUI::setSelectionHeaderSpanClass (   $a_val)

Set selection header span class.

Parameters
string$a_valheader span class

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

284 {
285 $this->sel_head_span_class = $a_val;
286 }

◆ setStyle()

ilAdvancedSelectionListGUI::setStyle (   $a_val)

Set style.

Parameters
int$a_valbutton style STYLE_DEFAULT, STYLE_LINK, STYLE_EMPH

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

262 {
263 $this->style = $a_val;
264 }

◆ setTriggerEvent()

ilAdvancedSelectionListGUI::setTriggerEvent (   $a_val)

Set trigger event.

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

422 {
423 $this->trigger_event = $a_val;
424 }

◆ setUseImages()

ilAdvancedSelectionListGUI::setUseImages (   $a_useimages)

Set Use Images.

Parameters
boolean$a_useimagesUse Images

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

384 {
385 $this->useimages = $a_useimages;
386 }

Field Documentation

◆ $access_key

ilAdvancedSelectionListGUI::$access_key = false
protected

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

Referenced by getAccessKey().

◆ $aria_listtitle

ilAdvancedSelectionListGUI::$aria_listtitle
protected

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

◆ $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().

◆ $listtitle

ilAdvancedSelectionListGUI::$listtitle
protected

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

Referenced by getListTitle().

◆ $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().

◆ 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: