ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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().

+ 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.

References $aria_listtitle.

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
683 $tpl->setCurrentBlock("href_s");
684 $tpl->setVariable("HREF_ITEM", 'href="' . $item["link"] . '"');
685 $tpl->setVariable("ID_ITEM", $this->getId() . "_" . $item["value"]);
686 $tpl->parseCurrentBlock();
687
688 $tpl->touchBlock("href_e");
689 }
690
691 $tpl->setCurrentBlock("item");
692 if ($this->getOnClickMode() ==
694 if ($item["prevent_background_click"]) {
695 $tpl->setVariable("ONCLICK_ITEM", '');
696 } else {
697 if ($item["onclick"] == "") {
698 $tpl->setVariable(
699 "ONCLICK_ITEM",
700 'onclick="' . "return il.AdvancedSelectionList.openTarget('" . $item["link"] . "','" . $item["frame"] . "');" . '"'
701 );
702 } else {
703 $tpl->setVariable(
704 "ONCLICK_ITEM",
705 'onclick="' . "return " . $item["onclick"] . ";" . '"'
706 );
707 }
708 }
709 } elseif ($this->getOnClickMode() ==
711 $tpl->setVariable(
712 "ONCLICK_ITEM",
713 'onclick="return il.AdvancedSelectionList.submitForm(\'' . $this->getId() . '\'' .
714 ", '" . $this->form_mode["select_name"] . "','" . $item["value"] . "'," .
715 "'" . $this->on_click_form_id . "','" . $this->form_mode["button_cmd"] . "');\""
716 );
717 } elseif ($this->getOnClickMode() ==
719 $tpl->setVariable(
720 "ONCLICK_ITEM",
721 'onclick="return il.AdvancedSelectionList.selectForm(\'' . $this->getId() . '\'' .
722 ", '" . $this->form_mode["select_name"] . "','" . $item["value"] . "'," .
723 "'" . $item["title"] . "');\""
724 );
725 } elseif ($this->getOnClickMode() ==
727 $tpl->setVariable(
728 "ONCLICK_ITEM",
729 'onclick="il.AdvancedSelectionList.clickNop(\'' . $this->getId() . '\'' .
730 ", '" . $this->form_mode["select_name"] . "','" . $item["value"] . "'," .
731 "'" . $item["title"] . "');\""
732 );
733 }
734
735 $tpl->setVariable("CSS_ROW", $this->css_row);
736 if ($item["html"] == "") {
737 $tpl->setVariable("TXT_ITEM", $item["title"]);
738 } else {
739 $tpl->setVariable("TXT_ITEM", $item["html"]);
740 }
741
742 $tpl->setVariable("ID_ITEM_TR", $this->getId() . "_" . $item["value"] . "_tr");
743 if ($item["ttip"] != "") {
744 include_once("./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php");
746 $this->getId() . "_" . $item["value"] . "_tr",
747 $item["ttip"],
748 "",
749 $item["tt_my"],
750 $item["tt_at"],
751 $item["tt_use_htmlspecialchars"]
752 );
753 }
754
755 $tpl->parseCurrentBlock();
756
757 // add item to js object
758 $tpl->setCurrentBlock("js_item");
759 $tpl->setVariable("IT_ID", $this->getId());
760 $tpl->setVariable("IT_HID_NAME", $this->form_mode["select_name"]);
761 $tpl->setVariable("IT_HID_VAL", $item["value"]);
762 $tpl->setVariable("IT_TITLE", str_replace("'", "\\'", $item["title"]));
763 $tpl->parseCurrentBlock();
764 }
765
766 // output hidden input, if click mode is form submission
768 $tpl->setCurrentBlock("hidden_input");
769 $tpl->setVariable("HID", $this->getId());
770 $tpl->parseCurrentBlock();
771 }
772
773 // output hidden input and initialize
775 $tpl->setCurrentBlock("hidden_input");
776 $tpl->setVariable("HID", $this->getId());
777 $tpl->parseCurrentBlock();
778
779 // init hidden input with selected value
780 $tpl->setCurrentBlock("init_hidden_input");
781 $tpl->setVariable("H2ID", $this->getId());
782 $tpl->setVariable("HID_NAME", $this->form_mode["select_name"]);
783 $tpl->setVariable("HID_VALUE", $this->getSelectedValue());
784 $tpl->parseCurrentBlock();
785 }
786 }
787 }
788
789 if ($a_only_cmd_list_asynch) {
790 $tpl->touchBlock("cmd_table");
791 return $tpl->get("cmd_table");
792 }
793
794 if ($this->getGroupedList() == null) {
795 $tpl->setCurrentBlock("dd_content");
796 if ($this->getPullRight()) {
797 $tpl->setVariable("UL_CLASS", "dropdown-menu pull-right");
798 } else {
799 $tpl->setVariable("UL_CLASS", "dropdown-menu");
800 }
801 $tpl->setVariable("TABLE_ID", $this->getId());
802 $tpl->parseCurrentBlock();
803 }
804
806 $tpl->setCurrentBlock("top_img");
807 switch ($this->getHeaderIcon()) {
809 $tpl->setVariable("IMG_SPAN_STYLE", ilAdvancedSelectionListGUI::ICON_CONFIG);
810 break;
811
813 default:
814 $tpl->setVariable("IMG_SPAN_STYLE", ilAdvancedSelectionListGUI::ICON_ARROW);
815 break;
816 }
817 $tpl->parseCurrentBlock();
818 }
819
820
821 if ($this->getAsynch()) {
822 $tpl->setCurrentBlock("asynch_bl");
823 $tpl->setVariable("ASYNCH_URL", $this->getAsynchUrl());
824 $tpl->setVariable("ASYNCH_ID", $this->getId());
825 $tpl->setVariable("ASYNCH_TRIGGER_ID", $this->getId());
826 $tpl->parseCurrentBlock();
827 }
828
829 // js section
830 $tpl->setCurrentBlock("js_section");
831 if ($this->getAccessKey() > 0) {
832 include_once("./Services/Accessibility/classes/class.ilAccessKeyGUI.php");
833 $tpl->setVariable("ACCKEY", ilAccessKeyGUI::getAttribute($this->getAccessKey()));
834 }
835
836 $cfg["trigger_event"] = $this->getTriggerEvent();
837 $cfg["auto_hide"] = $this->getAutoHide();
838
839 if ($this->getSelectCallback() != "") {
840 $cfg["select_callback"] = $this->getSelectCallback();
841 }
842 $cfg["anchor_id"] = "ilAdvSelListAnchorElement_" . $this->getId();
843 $cfg["asynch"] = $this->getAsynch()
844 ? true
845 : false;
846 $cfg["asynch_url"] = $this->getAsynchUrl();
848 if (is_array($toggle)) {
849 $cfg["toggle_el"] = $toggle["el"];
850 $cfg["toggle_class_on"] = $toggle["class_on"];
851 }
852 //echo "<br>".htmlentities($this->getAsynchUrl());
853 include_once("./Services/JSON/classes/class.ilJsonUtil.php");
854 $tpl->setVariable("CFG", ilJsonUtil::encode($cfg));
855
856 //echo htmlentities(ilJsonUtil::encode($cfg));
857
858 $tpl->setVariable("TXT_SEL_TOP", $this->getListTitle());
859 if ($this->getListTitle() == "" || $this->getAriaListTitle() != "") {
860 $aria_title = ($this->getAriaListTitle() != "")
861 ? $this->getAriaListTitle() != ""
862 : $this->lng->txt("actions");
863 $tpl->setVariable("TXT_ARIA_TOP", $aria_title);
864 }
865 $tpl->setVariable("ID", $this->getId());
866
867 //$tpl->setVariable("CLASS_SEL_TOP", $this->getSelectionHeaderClass());
868 switch ($this->getStyle()) {
870 $tpl->setVariable("BTN_CLASS", "btn btn-default");
871 $tpl->setVariable("TAG", "button");
872 break;
873
874 case self::STYLE_EMPH:
875 $tpl->setVariable("BTN_CLASS", "btn btn-primary");
876 $tpl->setVariable("TAG", "button");
877 break;
878
880 $tpl->setVariable("BTN_CLASS", "btn btn-link");
881 $tpl->setVariable("TAG", "button");
882 break;
883
884 case self::STYLE_LINK:
885 $tpl->setVariable("BTN_CLASS", "");
886 $tpl->setVariable("TAG", "a");
887 break;
888 }
889
890
891 if ($this->getSelectionHeaderSpanClass() != "") {
892 $tpl->setVariable(
893 "CLASS_SEL_TOP_SPAN",
895 );
896 }
897
898 // set the async url to an extra template variable
899 // (needed for a mobile skin)
900 // $tpl->setVariable("ASYNC_URL", $this->getAsynchUrl());
901
902 $tpl->parseCurrentBlock();
903
904 return $tpl->get();
905 }
$tpl
Definition: ilias.php:10
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
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
catch(Exception $e) if(isset( $_POST[ 'cancel'])) if(isset($_POST['continue'])) $cfg

References $cfg, $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(ilTemplate $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.

Referenced by getAriaListTitle().

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