ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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, $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...
 
 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
 
 $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 600 of file class.ilAdvancedSelectionListGUI.php.

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

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

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