ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilAdvancedSelectionListGUI Class Reference

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

+ Collaboration diagram for ilAdvancedSelectionListGUI:

Public Member Functions

 __construct ()
 Constructor. More...
 
 setLinksMode ($a_link_class="")
 Set links mode (for no js fallback) More...
 
 setFormSelectMode ($a_select_name, $a_select_class="", $a_include_form_tag=false, $a_form_action="", $a_form_id="", $a_form_class="", $a_form_target="_top", $a_button_text="", $a_button_class="", $a_button_cmd="")
 Set form mode (for no js fallback) More...
 
 addItem ($a_title, $a_value="", $a_link="", $a_img="", $a_alt="", $a_frame="", $a_html="", $a_prevent_background_click=false, $a_onclick="", $a_ttip="", $a_tt_my="right center", $a_tt_at="left center", $a_tt_use_htmlspecialchars=true)
 Add an item. More...
 
 flush ()
 
 getItems ()
 Get items. More...
 
 setListTitle ($a_listtitle)
 Set List Title. More...
 
 getListTitle ()
 Get List Title. More...
 
 setSelectionHeaderClass ($a_selectionheaderclass)
 Set Selection Header Class. More...
 
 getSelectionHeaderClass ()
 Get Selection Header Class. More...
 
 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...
 
 getHTML ($a_only_cmd_list_asynch=false)
 Get selection list HTML. More...
 

Data Fields

const DOWN_ARROW_LIGHT = "mm_down_arrow.png"
 
const DOWN_ARROW_DARK = "mm_down_arrow_dark.png"
 
const DOWN_ARROW_TOPBAR = "mm_down_arrow_topbar.png"
 
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"
 

Protected Attributes

 $css_row = ""
 
 $access_key = false
 
 $toggle = false
 
 $asynch_url = false
 
 $selected_value = ""
 
 $trigger_event = "click"
 
 $auto_hide = false
 

Private Attributes

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

Detailed Description

User interface class for advanced drop-down selection lists.

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

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

Constructor & Destructor Documentation

◆ __construct()

ilAdvancedSelectionListGUI::__construct ( )

Member Function Documentation

◆ addItem()

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

Add an item.

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

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

118  {
119  $this->items[] = array("title" => $a_title, "value" => $a_value,
120  "link" => $a_link, "img" => $a_img, "alt" => $a_alt, "frame" => $a_frame,
121  "html" => $a_html, "prevent_background_click" => $a_prevent_background_click,
122  "onclick" => $a_onclick, "ttip" => $a_ttip, "tt_my" => $a_tt_my, "tt_at" => $a_tt_at,
123  "tt_use_htmlspecialchars" => $a_tt_use_htmlspecialchars);
124  }

◆ flush()

ilAdvancedSelectionListGUI::flush ( )

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

127  {
128  $this->items = array();
129  }

◆ getAccessKey()

ilAdvancedSelectionListGUI::getAccessKey ( )

Get access key.

Returns
integer access key function id

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

References $toggle.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getAsynch()

ilAdvancedSelectionListGUI::getAsynch ( )

Get asynch mode.

Returns
boolean turn asynch mode on/off

Definition at line 440 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 460 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 348 of file class.ilAdvancedSelectionListGUI.php.

References $auto_hide.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getHeaderIcon()

ilAdvancedSelectionListGUI::getHeaderIcon ( )

Get Header Icon.

Returns
string Header Icon

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

Referenced by getHTML().

217  {
218  return $this->headericon;
219  }
+ Here is the caller graph for this function:

◆ getHTML()

ilAdvancedSelectionListGUI::getHTML (   $a_only_cmd_list_asynch = false)

Get selection list HTML.

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

References $GLOBALS, $items, $toggle, $tpl, ilTooltipGUI\addTooltip(), DOWN_ARROW_DARK, DOWN_ARROW_LIGHT, DOWN_ARROW_TOPBAR, ilJsonUtil\encode(), getAccessKey(), getAdditionalToggleElement(), getAsynch(), getAsynchUrl(), ilAccessKeyGUI\getAttribute(), getAutoHide(), getHeaderIcon(), getId(), ilUtil\getImagePath(), getItemLinkClass(), getItems(), getListTitle(), getOnClickMode(), getSelectCallback(), getSelectedValue(), getSelectionHeaderClass(), getSelectionHeaderSpanClass(), getTriggerEvent(), getUseImages(), ilYuiUtil\initOverlay(), MODE_FORM_SELECT, MODE_LINKS, NO_ICON, ON_ITEM_CLICK_FORM_SELECT, ON_ITEM_CLICK_FORM_SUBMIT, ON_ITEM_CLICK_HREF, and ON_ITEM_CLICK_NOP.

485  {
486  $items = $this->getItems();
487 
488  // do not show list, if no item is in list
489  if (count($items) == 0 && !$this->getAsynch())
490  {
491  return "";
492  }
493 
494  include_once("./Services/YUI/classes/class.ilYuiUtil.php");
496  $GLOBALS["tpl"]->addJavascript("./Services/UIComponent/Overlay/js/ilOverlay.js");
497  $GLOBALS["tpl"]->addJavascript("./Services/UIComponent/AdvancedSelectionList/js/AdvancedSelectionList.js");
498  $tpl = new ilTemplate("tpl.adv_selection_list.html", true, true,
499  "Services/UIComponent/AdvancedSelectionList", "DEFAULT", false, true);
500 
501  reset($items);
502 
503  $cnt = 0;
504 
505  if ($this->getAsynch())
506  {
507  $tpl->setCurrentBlock("asynch_request");
508  $tpl->setVariable("IMG_LOADER", ilUtil::getImagePath("loader.gif"));
509  $tpl->parseCurrentBlock();
510  }
511  else
512  {
513  foreach($items as $item)
514  {
515  if (isset($item["ref_id"]))
516  {
517  $sel_arr[$item["ref_id"]] = (isset($item["title"]))
518  ? $item["title"]
519  : "";
520  }
521  $this->css_row = ($this->css_row != "tblrow1_mo")
522  ? "tblrow1_mo"
523  : "tblrow2_mo";
524 
525  if ($this->getUseImages())
526  {
527  if ($item["img"])
528  {
529  $tpl->setCurrentBlock("image");
530  $tpl->setVariable("IMG_ITEM", $item["img"]);
531  $tpl->setVariable("ALT_ITEM", $item["alt"]);
532  $tpl->parseCurrentBlock();
533  }
534  else
535  {
536  $tpl->touchBlock("no_image");
537  }
538  }
539 
540  if ($this->getOnClickMode() ==
542  $this->getItemLinkClass() != "")
543  {
544  if ($item["frame"])
545  {
546  $tpl->setCurrentBlock("frame");
547  $tpl->setVariable("TARGET_ITEM", $item["frame"]);
548  $tpl->parseCurrentBlock();
549  }
550 
551  if ($this->getItemLinkClass() != "")
552  {
553  $tpl->setCurrentBlock("item_link_class");
554  $tpl->setVariable("ITEM_LINK_CLASS", $this->getItemLinkClass());
555  $tpl->parseCurrentBlock();
556  }
557 
558  $tpl->setCurrentBlock("href_s");
559  $tpl->setVariable("HREF_ITEM",'href="'.$item["link"].'"');
560  $tpl->setVariable("ID_ITEM", $this->getId()."_".$item["value"]);
561  $tpl->parseCurrentBlock();
562 
563  $tpl->touchBlock("href_e");
564 
565  }
566 
567  $tpl->setCurrentBlock("item");
568  if ($this->getOnClickMode() ==
570  {
571  if ($item["prevent_background_click"])
572  {
573  $tpl->setVariable("ONCLICK_ITEM",'');
574  }
575  else
576  {
577  if ($item["onclick"] == "")
578  {
579  $tpl->setVariable("ONCLICK_ITEM",
580  'onclick="'."return il.AdvancedSelectionList.openTarget('".$item["link"]."','".$item["frame"]."');".'"');
581  }
582  else
583  {
584  $tpl->setVariable("ONCLICK_ITEM",
585  'onclick="'."return ".$item["onclick"].";".'"');
586  }
587  }
588 
589  }
590  else if ($this->getOnClickMode() ==
592  {
593  $tpl->setVariable("ONCLICK_ITEM",
594  'onclick="return il.AdvancedSelectionList.submitForm(\''.$this->getId().'\''.
595  ", '".$this->form_mode["select_name"]."','".$item["value"]."',".
596  "'".$this->on_click_form_id."','".$this->form_mode["button_cmd"]."');\"");
597  }
598  else if ($this->getOnClickMode() ==
600  {
601  $tpl->setVariable("ONCLICK_ITEM",
602  'onclick="return il.AdvancedSelectionList.selectForm(\''.$this->getId().'\''.
603  ", '".$this->form_mode["select_name"]."','".$item["value"]."',".
604  "'".$item["title"]."');\"");
605  }
606  else if ($this->getOnClickMode() ==
608  {
609  $tpl->setVariable("ONCLICK_ITEM",
610  'onclick="il.AdvancedSelectionList.clickNop(\''.$this->getId().'\''.
611  ", '".$this->form_mode["select_name"]."','".$item["value"]."',".
612  "'".$item["title"]."');\"");
613  }
614 
615  $tpl->setVariable("CSS_ROW", $this->css_row);
616  if ($item["html"] == "")
617  {
618  $tpl->setVariable("TXT_ITEM", $item["title"]);
619  }
620  else
621  {
622  $tpl->setVariable("TXT_ITEM", $item["html"]);
623  }
624 
625  $tpl->setVariable("ID_ITEM_TR", $this->getId()."_".$item["value"]."_tr");
626  if ($item["ttip"] != "")
627  {
628  include_once("./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php");
629  ilTooltipGUI::addTooltip($this->getId()."_".$item["value"]."_tr", $item["ttip"],
630  "", $item["tt_my"], $item["tt_at"], $item["tt_use_htmlspecialchars"]);
631  }
632 
633  $tpl->parseCurrentBlock();
634 
635  // add item to js object
636  $tpl->setCurrentBlock("js_item");
637  $tpl->setVariable("IT_ID", $this->getId());
638  $tpl->setVariable("IT_HID_NAME", $this->form_mode["select_name"]);
639  $tpl->setVariable("IT_HID_VAL", $item["value"]);
640  $tpl->setVariable("IT_TITLE", str_replace("'", "\\'", $item["title"]));
641  $tpl->parseCurrentBlock();
642  }
643  }
644 
645  $tpl->setCurrentBlock("cmd_table");
646  $tpl->parseCurrentBlock();
647 
648  if ($a_only_cmd_list_asynch)
649  {
650  return $tpl->get("cmd_table");
651  }
652 
654  {
655  $tpl->setCurrentBlock("top_img");
656  switch ($this->getHeaderIcon())
657  {
659  $tpl->setVariable("IMG_DOWN",
661  break;
663  $tpl->setVariable("IMG_DOWN",
665  break;
667  $tpl->setVariable("IMG_DOWN",
669  break;
670  default:
671  $tpl->setVariable("IMG_DOWN", $this->getHeaderIcon());
672  break;
673  }
674  // do not repeat title (accessibility) -> empty alt
675  //$tpl->setVariable("ALT_SEL_TOP", $this->getListTitle());
676  $tpl->setVariable("ALT_SEL_TOP", "");
677  $tpl->parseCurrentBlock();
678  }
679 
680  // output hidden input, if click mode is form submission
682  {
683  $tpl->setCurrentBlock("hidden_input");
684  $tpl->setVariable("HID", $this->getId());
685  $tpl->parseCurrentBlock();
686  }
687 
688  // output hidden input and initialize
690  {
691  $tpl->setCurrentBlock("hidden_input");
692  $tpl->setVariable("HID", $this->getId());
693  $tpl->parseCurrentBlock();
694 
695  // init hidden input with selected value
696  $tpl->setCurrentBlock("init_hidden_input");
697  $tpl->setVariable("H2ID", $this->getId());
698  $tpl->setVariable("HID_NAME", $this->form_mode["select_name"]);
699  $tpl->setVariable("HID_VALUE", $this->getSelectedValue());
700  $tpl->parseCurrentBlock();
701  }
702 
703  // js section
704  $tpl->setCurrentBlock("js_section");
705  if ($this->getAccessKey() > 0)
706  {
707  include_once("./Services/Accessibility/classes/class.ilAccessKeyGUI.php");
708  $tpl->setVariable("ACCKEY", ilAccessKeyGUI::getAttribute($this->getAccessKey()));
709  }
710 
711  $cfg["trigger_event"] = $this->getTriggerEvent();
712  $cfg["auto_hide"] = $this->getAutoHide();
713 
714  if ($this->getSelectCallback() != "")
715  {
716  $cfg["select_callback"] = $this->getSelectCallback();
717  }
718  $cfg["anchor_id"] = "ilAdvSelListAnchorElement_".$this->getId();
719  $cfg["asynch"] = $this->getAsynch()
720  ? true
721  : false;
722  $cfg["asynch_url"] = $this->getAsynchUrl();
724  if (is_array($toggle))
725  {
726  $cfg["toggle_el"] = $toggle["el"];
727  $cfg["toggle_class_on"] = $toggle["class_on"];
728  }
729 //echo "<br>".htmlentities($this->getAsynchUrl());
730  include_once("./Services/JSON/classes/class.ilJsonUtil.php");
731  $tpl->setVariable("TXT_SEL_TOP", $this->getListTitle());
732  $tpl->setVariable("ID", $this->getId());
733  $tpl->setVariable("CFG", ilJsonUtil::encode($cfg));
734 //echo htmlentities(ilJsonUtil::encode($cfg));
735  $tpl->setVariable("CLASS_SEL_TOP", $this->getSelectionHeaderClass());
736  if ($this->getSelectionHeaderSpanClass() != "")
737  {
738  $tpl->setVariable("CLASS_SEL_TOP_SPAN",
739  $this->getSelectionHeaderSpanClass());
740  }
741 
742  // set the async url to an extra template variable
743  // (needed for a mobile skin)
744  $tpl->setVariable("ASYNC_URL", $this->getAsynchUrl());
745 
746  $tpl->parseCurrentBlock();
747 
748  // no js sections
749 if (false)
750 {
751  switch ($this->mode)
752  {
753  // links mode
755  reset($items);
756  $cnt = 0;
757  foreach($items as $item)
758  {
759  $tpl->setCurrentBlock("no_js_link");
760  $tpl->setVariable("LINKS_CLASS", $this->links_mode["link_class"]);
761  $tpl->setVariable("LINKS_HREF", $item["link"]);
762  $tpl->setVariable("LINKS_TXT", $item["title"]);
763  $tpl->parseCurrentBlock();
764  $tpl->setCurrentBlock("no_js_section");
765  $tpl->parseCurrentBlock();
766  }
767  break;
768 
770  reset($items);
771  $cnt = 0;
772  foreach($items as $item)
773  {
774  $tpl->setCurrentBlock("no_js_form_option");
775  $tpl->setVariable("FRM_OPTION_TXT", $item["title"]);
776  $tpl->setVariable("FRM_OPTION_VAL", $item["value"]);
777  if ($this->getSelectedValue() == $item["value"])
778  {
779  $tpl->setVariable("SELECTED", ' selected="selected" ');
780  }
781  $tpl->parseCurrentBlock();
782  }
783  if ($this->form_mode["include_form_tag"])
784  {
785  $tpl->setCurrentBlock("no_js_form_begin");
786  $tpl->setVariable("FRM_ID", $this->form_mode["form_id"]);
787  $tpl->setVariable("FRM_CLASS", $this->form_mode["form_class"]);
788  $tpl->setVariable("FRM_ACTION", $this->form_mode["form_action"]);
789  $tpl->setVariable("FRM_TARGET", $this->form_mode["form_target"]);
790  $tpl->parseCurrentBlock();
791  $tpl->touchBlock("no_js_form_end");
792  }
793  if ($this->form_mode["button_text"])
794  {
795  $tpl->setCurrentBlock("no_js_form_button");
796  $tpl->setVariable("FRM_BT_TXT", $this->form_mode["button_text"]);
797  $tpl->setVariable("FRM_BT_CLASS", $this->form_mode["button_class"]);
798  if ($this->form_mode["button_cmd"] != "")
799  {
800  $tpl->setVariable("FRM_BT_CMD", 'name="cmd['.$this->form_mode["button_cmd"].']"');
801  }
802  $tpl->parseCurrentBlock();
803  }
804  $tpl->setVariable("FRM_SELECT_NAME", $this->form_mode["select_name"]);
805  $tpl->setVariable("FRM_SELECT_CLASS", $this->form_mode["select_class"]);
806 
807  if ($this->getAccessKey() > 0)
808  {
809  include_once("./Services/Accessibility/classes/class.ilAccessKeyGUI.php");
810  $tpl->setVariable("ACCKEYNJS", ilAccessKeyGUI::getAttribute($this->getAccessKey()));
811  }
812 
813  $tpl->setCurrentBlock("no_js_section");
814  $tpl->parseCurrentBlock();
815  break;
816  }
817 }
818 
819  return $tpl->get();
820  }
getAdditionalToggleElement()
Get additional toggle element.
getSelectionHeaderSpanClass()
Get selection header span class.
static encode($mixed, $suppress_native=false)
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.
$GLOBALS['ct_recipient']
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
special template class to simplify handling of ITX/PEAR
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
static initOverlay()
Init YUI Overlay module.
static getAttribute($a_func_id)
Get accesskey HTML attribute.
getSelectionHeaderClass()
Get Selection Header Class.
+ Here is the call graph for this function:

◆ getId()

ilAdvancedSelectionListGUI::getId ( )

Get Id.

Returns
string Id

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

Referenced by getHTML().

257  {
258  return $this->itemlinkclass;
259  }
+ Here is the caller graph for this function:

◆ getItems()

ilAdvancedSelectionListGUI::getItems ( )

Get items.

Returns
array array of items

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

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

Referenced by getHTML().

157  {
158  return $this->listtitle;
159  }
+ 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 236 of file class.ilAdvancedSelectionListGUI.php.

237  {
238  return $this->nojslinkclass;
239  }

◆ getOnClickMode()

ilAdvancedSelectionListGUI::getOnClickMode ( )

Get "onClick"-Mode.

Returns

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

Referenced by getHTML().

375  {
376  return $this->on_click;
377  }
+ Here is the caller graph for this function:

◆ getSelectCallback()

ilAdvancedSelectionListGUI::getSelectCallback ( )

Get select callback.

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

Referenced by getHTML().

477  {
478  return $this->select_callback;
479  }
+ Here is the caller graph for this function:

◆ getSelectedValue()

ilAdvancedSelectionListGUI::getSelectedValue ( )

Get selected value.

Returns
string selected value

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

Referenced by getHTML().

177  {
178  return $this->selectionheaderclass;
179  }
+ Here is the caller graph for this function:

◆ getSelectionHeaderSpanClass()

ilAdvancedSelectionListGUI::getSelectionHeaderSpanClass ( )

Get selection header span class.

Returns
string header span class

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

Referenced by getHTML().

197  {
198  return $this->sel_head_span_class;
199  }
+ Here is the caller graph for this function:

◆ getTriggerEvent()

ilAdvancedSelectionListGUI::getTriggerEvent ( )

Get trigger event.

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

Referenced by getHTML().

297  {
298  return $this->useimages;
299  }
+ Here is the caller graph for this function:

◆ setAccessKey()

ilAdvancedSelectionListGUI::setAccessKey (   $a_val)

Set access key.

Parameters
integeraccess function id

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

307  {
308  $this->access_key = $a_val;
309  }

◆ setAdditionalToggleElement()

ilAdvancedSelectionListGUI::setAdditionalToggleElement (   $a_el,
  $a_on 
)

Set additional toggle element.

Parameters
stringelement id
stringclass for "on"

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

406  {
407  $this->toggle = array("el" => $a_el, "class_on" => $a_on);
408  }

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

References ilYuiUtil\initConnection().

426  {
427  if ($a_val)
428  {
429  include_once("./Services/YUI/classes/class.ilYuiUtil.php");
431  }
432  $this->asynch = $a_val;
433  }
static initConnection()
Init YUI Connection module.
+ Here is the call graph for this function:

◆ setAsynchUrl()

ilAdvancedSelectionListGUI::setAsynchUrl (   $a_val)

Set asynch url.

Parameters
stringasynch url

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

451  {
452  $this->asynch_url = $a_val;
453  }

◆ setAutoHide()

ilAdvancedSelectionListGUI::setAutoHide (   $a_val)

Set auto hide.

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

341  {
342  $this->auto_hide = $a_val;
343  }

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

References MODE_FORM_SELECT.

88  {
90  $this->form_mode = array(
91  "select_name" => $a_select_name,
92  "select_class" => $a_select_class,
93  "include_form_tag" => $a_include_form_tag,
94  "form_action" => $a_form_action,
95  "form_id" => $a_form_id,
96  "form_class" => $a_form_class,
97  "form_target" => $a_form_target,
98  "button_text" => $a_button_text,
99  "button_class" => $a_button_class,
100  "button_cmd" => $a_button_cmd
101  );
102  }

◆ setHeaderIcon()

ilAdvancedSelectionListGUI::setHeaderIcon (   $a_headericon)

Set Header Icon.

Parameters
string$a_headericonHeader Icon

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

Referenced by __construct().

207  {
208  $this->headericon = $a_headericon;
209  }
+ Here is the caller graph for this function:

◆ setId()

ilAdvancedSelectionListGUI::setId (   $a_id)

Set Id.

Parameters
string$a_idId

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

267  {
268  $this->id = $a_id;
269  }

◆ setItemLinkClass()

ilAdvancedSelectionListGUI::setItemLinkClass (   $a_itemlinkclass)

Set Item Link Class.

Parameters
string$a_itemlinkclassItem Link Class

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

247  {
248  $this->itemlinkclass = $a_itemlinkclass;
249  }

◆ setLinksMode()

ilAdvancedSelectionListGUI::setLinksMode (   $a_link_class = "")

Set links mode (for no js fallback)

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

References MODE_LINKS.

73  {
75  $this->links_mode = array(
76  "link_class" => $a_link_class);
77  }

◆ setListTitle()

ilAdvancedSelectionListGUI::setListTitle (   $a_listtitle)

Set List Title.

Parameters
string$a_listtitleList Title

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

147  {
148  $this->listtitle = $a_listtitle;
149  }

◆ setNoJSLinkClass()

ilAdvancedSelectionListGUI::setNoJSLinkClass (   $a_nojslinkclass)

Set No Javascript Link Style Class.

Parameters
string$a_nojslinkclassNo Javascript Link Style Class

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

227  {
228  $this->nojslinkclass = $a_nojslinkclass;
229  }

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

Referenced by __construct().

364  {
365  $this->on_click = $a_val;
366  $this->on_click_form_id = $a_onclick_form_id;
367  }
+ Here is the caller graph for this function:

◆ setSelectCallback()

ilAdvancedSelectionListGUI::setSelectCallback (   $a_val)

Set select callback.

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

469  {
470  $this->select_callback = $a_val;
471  }

◆ setSelectedValue()

ilAdvancedSelectionListGUI::setSelectedValue (   $a_val)

Set selected value.

Parameters
stringselected value

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

385  {
386  $this->selected_value = $a_val;
387  }

◆ setSelectionHeaderClass()

ilAdvancedSelectionListGUI::setSelectionHeaderClass (   $a_selectionheaderclass)

Set Selection Header Class.

Parameters
string$a_selectionheaderclassSelection Header Class

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

167  {
168  $this->selectionheaderclass = $a_selectionheaderclass;
169  }

◆ setSelectionHeaderSpanClass()

ilAdvancedSelectionListGUI::setSelectionHeaderSpanClass (   $a_val)

Set selection header span class.

Parameters
string$a_valheader span class

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

187  {
188  $this->sel_head_span_class = $a_val;
189  }

◆ setTriggerEvent()

ilAdvancedSelectionListGUI::setTriggerEvent (   $a_val)

Set trigger event.

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

325  {
326  $this->trigger_event = $a_val;
327  }

◆ setUseImages()

ilAdvancedSelectionListGUI::setUseImages (   $a_useimages)

Set Use Images.

Parameters
boolean$a_useimagesUse Images

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

287  {
288  $this->useimages = $a_useimages;
289  }

Field Documentation

◆ $access_key

ilAdvancedSelectionListGUI::$access_key = false
protected

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

Referenced by getAccessKey().

◆ $asynch

ilAdvancedSelectionListGUI::$asynch = false
private

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

Referenced by getAsynch().

◆ $asynch_url

ilAdvancedSelectionListGUI::$asynch_url = false
protected

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

Referenced by getAsynchUrl().

◆ $auto_hide

ilAdvancedSelectionListGUI::$auto_hide = false
protected

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

Referenced by getAutoHide().

◆ $css_row

ilAdvancedSelectionListGUI::$css_row = ""
protected

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

◆ $id

ilAdvancedSelectionListGUI::$id = "asl"
private

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

Referenced by getId().

◆ $items

ilAdvancedSelectionListGUI::$items = array()
private

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

Referenced by getHTML(), and getItems().

◆ $selected_value

ilAdvancedSelectionListGUI::$selected_value = ""
protected

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

Referenced by getSelectedValue().

◆ $toggle

ilAdvancedSelectionListGUI::$toggle = false
protected

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

Referenced by getAdditionalToggleElement(), and getHTML().

◆ $trigger_event

ilAdvancedSelectionListGUI::$trigger_event = "click"
protected

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

Referenced by getTriggerEvent().

◆ DOWN_ARROW_DARK

◆ DOWN_ARROW_LIGHT

const ilAdvancedSelectionListGUI::DOWN_ARROW_LIGHT = "mm_down_arrow.png"

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

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

◆ DOWN_ARROW_TOPBAR

const ilAdvancedSelectionListGUI::DOWN_ARROW_TOPBAR = "mm_down_arrow_topbar.png"

◆ MODE_FORM_SELECT

const ilAdvancedSelectionListGUI::MODE_FORM_SELECT = "select"

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

Referenced by getHTML(), and setFormSelectMode().

◆ MODE_LINKS

const ilAdvancedSelectionListGUI::MODE_LINKS = "links"

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

Referenced by __construct(), getHTML(), and setLinksMode().

◆ NO_ICON

const ilAdvancedSelectionListGUI::NO_ICON = ""

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

Referenced by ilNavigationHistoryGUI\getHTML(), and 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"

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