ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilCheckboxListOverlayGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilCheckboxListOverlayGUI:

Public Member Functions

 __construct (string $a_id="")
 
 setId (string $a_val)
 
 getId ()
 
 setLinkTitle (string $a_val)
 
 getLinkTitle ()
 
 setItems (array $a_val)
 
 getItems ()
 
 setSelectionHeaderClass (string $a_selectionheaderclass)
 
 getSelectionHeaderClass ()
 
 setFormCmd (string $a_val)
 
 getFormCmd ()
 
 setFieldVar (string $a_val)
 
 getFieldVar ()
 
 setHiddenVar (string $a_val)
 
 getHiddenVar ()
 
 getHTML (bool $pull_right=true)
 

Protected Attributes

ilLanguage $lng
 
string $id
 
string $link_title
 
string $selectionheaderclass
 
string $form_cmd
 
string $field_var
 
string $hidden_var
 
ilGlobalTemplateInterface $main_tpl
 

Private Attributes

array $items = array()
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning User interface class for a checkbox list overlay

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de
Deprecated:
only used in legacy tables, do not introduce this anywhere else

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

Constructor & Destructor Documentation

◆ __construct()

ilCheckboxListOverlayGUI::__construct ( string  $a_id = "")

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

References $DIC, ILIAS\Repository\lng(), and setId().

39  {
40  global $DIC;
41 
42  $this->lng = $DIC->language();
43  $this->setId($a_id);
44  $this->main_tpl = $DIC->ui()->mainTemplate();
45  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

Member Function Documentation

◆ getFieldVar()

ilCheckboxListOverlayGUI::getFieldVar ( )

Definition at line 103 of file class.ilCheckboxListOverlayGUI.php.

References $field_var.

Referenced by getHTML().

103  : string
104  {
105  return $this->field_var;
106  }
+ Here is the caller graph for this function:

◆ getFormCmd()

ilCheckboxListOverlayGUI::getFormCmd ( )

Definition at line 93 of file class.ilCheckboxListOverlayGUI.php.

References $form_cmd.

Referenced by getHTML().

93  : string
94  {
95  return $this->form_cmd;
96  }
+ Here is the caller graph for this function:

◆ getHiddenVar()

ilCheckboxListOverlayGUI::getHiddenVar ( )

Definition at line 113 of file class.ilCheckboxListOverlayGUI.php.

References $hidden_var.

Referenced by getHTML().

113  : string
114  {
115  return $this->hidden_var;
116  }
+ Here is the caller graph for this function:

◆ getHTML()

ilCheckboxListOverlayGUI::getHTML ( bool  $pull_right = true)

Definition at line 118 of file class.ilCheckboxListOverlayGUI.php.

References $lng, $tpl, getFieldVar(), getFormCmd(), getHiddenVar(), getId(), getItems(), getLinkTitle(), and ilLanguage\txt().

118  : string
119  {
120  $lng = $this->lng;
121 
122  $items = $this->getItems();
123 
124  $tpl = new ilTemplate(
125  "tpl.checkbox_list_overlay.html",
126  true,
127  true,
128  "Services/UIComponent/CheckboxListOverlay",
129  "DEFAULT",
130  false,
131  true
132  );
133 
134  $this->main_tpl->addOnLoadCode("$('#chkbxlstovl_" . $this->getId() . "').click(function(event){
135  event.stopPropagation();
136  });");
137 
138  $tpl->touchBlock("top_img");
139 
140  // do not repeat title (accessibility) -> empty alt
141  $tpl->setVariable("TXT_SEL_TOP", $this->getLinkTitle());
142 
143  $tpl->parseCurrentBlock();
144 
145  reset($items);
146  $cnt = 0;
147  foreach ($items as $k => $v) {
148  $tpl->setCurrentBlock("list_entry");
149  $tpl->setVariable("VAR", $this->getFieldVar());
150  $tpl->setVariable("VAL_ENTRY", $k);
151  $tpl->setVariable("TXT_ENTRY", $v["txt"]);
152  $tpl->setVariable("IDX_ENTRY", ++$cnt);
153  if ($v["selected"]) {
154  $tpl->setVariable("CHECKED", "checked='checked'");
155  }
156  $tpl->parseCurrentBlock();
157  }
158 
159  if ($pull_right) {
160  $tpl->touchBlock("pr");
161  }
162 
163  $tpl->setVariable("ID", $this->getId());
164  $tpl->setVariable("HIDDEN_VAR", $this->getHiddenVar());
165  $tpl->setVariable("CMD_SUBMIT", $this->getFormCmd());
166  $tpl->setVariable("VAL_SUBMIT", $lng->txt("refresh"));
167  return $tpl->get();
168  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41
+ Here is the call graph for this function:

◆ getId()

ilCheckboxListOverlayGUI::getId ( )

Definition at line 52 of file class.ilCheckboxListOverlayGUI.php.

References $id.

Referenced by getHTML().

52  : string
53  {
54  return $this->id;
55  }
+ Here is the caller graph for this function:

◆ getItems()

ilCheckboxListOverlayGUI::getItems ( )

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

References $items.

Referenced by getHTML().

72  : array
73  {
74  return $this->items;
75  }
+ Here is the caller graph for this function:

◆ getLinkTitle()

ilCheckboxListOverlayGUI::getLinkTitle ( )

Definition at line 62 of file class.ilCheckboxListOverlayGUI.php.

References $link_title.

Referenced by getHTML().

62  : string
63  {
64  return $this->link_title;
65  }
+ Here is the caller graph for this function:

◆ getSelectionHeaderClass()

ilCheckboxListOverlayGUI::getSelectionHeaderClass ( )

Definition at line 83 of file class.ilCheckboxListOverlayGUI.php.

References $selectionheaderclass.

83  : string
84  {
86  }

◆ setFieldVar()

ilCheckboxListOverlayGUI::setFieldVar ( string  $a_val)

Definition at line 98 of file class.ilCheckboxListOverlayGUI.php.

98  : void
99  {
100  $this->field_var = $a_val;
101  }

◆ setFormCmd()

ilCheckboxListOverlayGUI::setFormCmd ( string  $a_val)

Definition at line 88 of file class.ilCheckboxListOverlayGUI.php.

88  : void
89  {
90  $this->form_cmd = $a_val;
91  }

◆ setHiddenVar()

ilCheckboxListOverlayGUI::setHiddenVar ( string  $a_val)

Definition at line 108 of file class.ilCheckboxListOverlayGUI.php.

108  : void
109  {
110  $this->hidden_var = $a_val;
111  }

◆ setId()

ilCheckboxListOverlayGUI::setId ( string  $a_val)

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

Referenced by __construct().

47  : void
48  {
49  $this->id = $a_val;
50  }
+ Here is the caller graph for this function:

◆ setItems()

ilCheckboxListOverlayGUI::setItems ( array  $a_val)

Definition at line 67 of file class.ilCheckboxListOverlayGUI.php.

67  : void
68  {
69  $this->items = $a_val;
70  }

◆ setLinkTitle()

ilCheckboxListOverlayGUI::setLinkTitle ( string  $a_val)

Definition at line 57 of file class.ilCheckboxListOverlayGUI.php.

57  : void
58  {
59  $this->link_title = $a_val;
60  }

◆ setSelectionHeaderClass()

ilCheckboxListOverlayGUI::setSelectionHeaderClass ( string  $a_selectionheaderclass)

Definition at line 77 of file class.ilCheckboxListOverlayGUI.php.

79  : void {
80  $this->selectionheaderclass = $a_selectionheaderclass;
81  }

Field Documentation

◆ $field_var

string ilCheckboxListOverlayGUI::$field_var
protected

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

Referenced by getFieldVar().

◆ $form_cmd

string ilCheckboxListOverlayGUI::$form_cmd
protected

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

Referenced by getFormCmd().

◆ $hidden_var

string ilCheckboxListOverlayGUI::$hidden_var
protected

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

Referenced by getHiddenVar().

◆ $id

string ilCheckboxListOverlayGUI::$id
protected

Definition at line 29 of file class.ilCheckboxListOverlayGUI.php.

Referenced by getId().

◆ $items

array ilCheckboxListOverlayGUI::$items = array()
private

Definition at line 28 of file class.ilCheckboxListOverlayGUI.php.

Referenced by getItems().

◆ $link_title

string ilCheckboxListOverlayGUI::$link_title
protected

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

Referenced by getLinkTitle().

◆ $lng

ilLanguage ilCheckboxListOverlayGUI::$lng
protected

Definition at line 27 of file class.ilCheckboxListOverlayGUI.php.

Referenced by getHTML().

◆ $main_tpl

ilGlobalTemplateInterface ilCheckboxListOverlayGUI::$main_tpl
protected

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

◆ $selectionheaderclass

string ilCheckboxListOverlayGUI::$selectionheaderclass
protected

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

Referenced by getSelectionHeaderClass().


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