ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilCheckboxListOverlayGUI Class Reference

User interface class for a checkbox list overlay. More...

+ Collaboration diagram for ilCheckboxListOverlayGUI:

Public Member Functions

 __construct ($a_id="")
 Constructor. More...
 
 setId ($a_val)
 Set id. More...
 
 getId ()
 Get id. More...
 
 setLinkTitle ($a_val)
 Set link title. More...
 
 getLinkTitle ()
 Get link title. More...
 
 setItems ($a_val)
 Set items. More...
 
 getItems ()
 Get items. More...
 
 setSelectionHeaderClass ($a_selectionheaderclass)
 Set Selection Header Class. More...
 
 getSelectionHeaderClass ()
 Get Selection Header Class. More...
 
 setFormCmd ($a_val)
 Set form command. More...
 
 getFormCmd ()
 Get form command. More...
 
 setFieldVar ($a_val)
 Set field var. More...
 
 getFieldVar ()
 Get field var. More...
 
 setHiddenVar ($a_val)
 Set hidden var (used to indicated that checkbox array has been sent in a form) More...
 
 getHiddenVar ()
 Get hidden var. More...
 
 getHTML ()
 Get selection list HTML. More...
 

Private Attributes

 $items = array()
 

Detailed Description

User interface class for a checkbox list overlay.

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

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

Constructor & Destructor Documentation

◆ __construct()

ilCheckboxListOverlayGUI::__construct (   $a_id = "")

Constructor.

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

19 {
20 $this->setId($a_id);
21 }

References setId().

+ Here is the call graph for this function:

Member Function Documentation

◆ getFieldVar()

ilCheckboxListOverlayGUI::getFieldVar ( )

Get field var.

Returns
string field var

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

140 {
141 return $this->field_var;
142 }

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getFormCmd()

ilCheckboxListOverlayGUI::getFormCmd ( )

Get form command.

Returns
string form command

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

120 {
121 return $this->form_cmd;
122 }

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getHiddenVar()

ilCheckboxListOverlayGUI::getHiddenVar ( )

Get hidden var.

Returns
string hidden var

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

160 {
161 return $this->hidden_var;
162 }

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getHTML()

ilCheckboxListOverlayGUI::getHTML ( )

Get selection list HTML.

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

167 {
168 global $lng;
169
170 $items = $this->getItems();
171
172 $tpl = new ilTemplate("tpl.checkbox_list_overlay.html", true, true,
173 "Services/UIComponent/CheckboxListOverlay", "DEFAULT", false, true);
174
175 $tpl->setCurrentBlock("top_img");
176
177 // do not repeat title (accessibility) -> empty alt
178 $tpl->setVariable("TXT_SEL_TOP", $this->getLinkTitle());
179 $tpl->setVariable("ALT_SEL_TOP", "");
180
181 $tpl->parseCurrentBlock();
182
183 reset($items);
184 $cnt = 0;
185 foreach ($items as $k => $v)
186 {
187 $tpl->setCurrentBlock("list_entry");
188 $tpl->setVariable("VAR", $this->getFieldVar());
189 $tpl->setVariable("VAL_ENTRY", $k);
190 $tpl->setVariable("TXT_ENTRY", $v["txt"]);
191 $tpl->setVariable("IDX_ENTRY", ++$cnt);
192 if ($v["selected"])
193 {
194 $tpl->setVariable("CHECKED", "checked='checked'");
195 }
196 $tpl->parseCurrentBlock();
197 }
198
199 $tpl->setVariable("ID", $this->getId());
200 $tpl->setVariable("HIDDEN_VAR", $this->getHiddenVar());
201 $tpl->setVariable("CMD_SUBMIT", $this->getFormCmd());
202 $tpl->setVariable("VAL_SUBMIT", $lng->txt("refresh"));
203 return $tpl->get();
204 }
global $tpl
Definition: ilias.php:8
special template class to simplify handling of ITX/PEAR
global $lng
Definition: privfeed.php:40

References $items, $lng, $tpl, getFieldVar(), getFormCmd(), getHiddenVar(), getId(), getItems(), and getLinkTitle().

+ Here is the call graph for this function:

◆ getId()

ilCheckboxListOverlayGUI::getId ( )

Get id.

Returns
string id

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

39 {
40 return $this->id;
41 }

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getItems()

ilCheckboxListOverlayGUI::getItems ( )

Get items.

Returns
array items

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

80 {
81 return $this->items;
82 }

References $items.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getLinkTitle()

ilCheckboxListOverlayGUI::getLinkTitle ( )

Get link title.

Returns
string link title

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

60 {
61 return $this->link_title;
62 }

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getSelectionHeaderClass()

ilCheckboxListOverlayGUI::getSelectionHeaderClass ( )

Get Selection Header Class.

Returns
string Selection Header Class

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

100 {
101 return $this->selectionheaderclass;
102 }

◆ setFieldVar()

ilCheckboxListOverlayGUI::setFieldVar (   $a_val)

Set field var.

Parameters
stringfield var

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

130 {
131 $this->field_var = $a_val;
132 }

◆ setFormCmd()

ilCheckboxListOverlayGUI::setFormCmd (   $a_val)

Set form command.

Parameters
stringform command

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

110 {
111 $this->form_cmd = $a_val;
112 }

◆ setHiddenVar()

ilCheckboxListOverlayGUI::setHiddenVar (   $a_val)

Set hidden var (used to indicated that checkbox array has been sent in a form)

Parameters
stringhidden var

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

150 {
151 $this->hidden_var = $a_val;
152 }

◆ setId()

ilCheckboxListOverlayGUI::setId (   $a_val)

Set id.

Parameters
stringid

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

29 {
30 $this->id = $a_val;
31 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setItems()

ilCheckboxListOverlayGUI::setItems (   $a_val)

Set items.

Parameters
arrayitems

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

70 {
71 $this->items = $a_val;
72 }

◆ setLinkTitle()

ilCheckboxListOverlayGUI::setLinkTitle (   $a_val)

Set link title.

Parameters
stringlink title

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

50 {
51 $this->link_title = $a_val;
52 }

◆ setSelectionHeaderClass()

ilCheckboxListOverlayGUI::setSelectionHeaderClass (   $a_selectionheaderclass)

Set Selection Header Class.

Parameters
string$a_selectionheaderclassSelection Header Class

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

90 {
91 $this->selectionheaderclass = $a_selectionheaderclass;
92 }

Field Documentation

◆ $items

ilCheckboxListOverlayGUI::$items = array()
private

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

Referenced by getHTML(), and getItems().


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