ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilCheckboxListOverlayGUI Class Reference

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

+ Collaboration diagram for ilCheckboxListOverlayGUI:

Public Member Functions

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

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

ilCheckboxListOverlayGUI::__construct (   $a_id = "")

Constructor.

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

References setId().

{
$this->setId($a_id);
}

+ Here is the call graph for this function:

Member Function Documentation

ilCheckboxListOverlayGUI::getFieldVar ( )

Get field var.

Returns
string field var

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

Referenced by getHTML().

{
return $this->field_var;
}

+ Here is the caller graph for this function:

ilCheckboxListOverlayGUI::getFormCmd ( )

Get form command.

Returns
string form command

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

Referenced by getHTML().

{
return $this->form_cmd;
}

+ Here is the caller graph for this function:

ilCheckboxListOverlayGUI::getHiddenVar ( )

Get hidden var.

Returns
string hidden var

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

Referenced by getHTML().

{
return $this->hidden_var;
}

+ Here is the caller graph for this function:

ilCheckboxListOverlayGUI::getHTML ( )

Get selection list HTML.

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

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

{
global $lng;
$items = $this->getItems();
$tpl = new ilTemplate("tpl.checkbox_list_overlay.html", true, true,
"Services/UIComponent/CheckboxListOverlay", "DEFAULT", false, true);
$tpl->setCurrentBlock("top_img");
// do not repeat title (accessibility) -> empty alt
$tpl->setVariable("TXT_SEL_TOP", $this->getLinkTitle());
$tpl->setVariable("ALT_SEL_TOP", "");
$tpl->parseCurrentBlock();
reset($items);
$cnt = 0;
foreach ($items as $k => $v)
{
$tpl->setCurrentBlock("list_entry");
$tpl->setVariable("VAR", $this->getFieldVar());
$tpl->setVariable("VAL_ENTRY", $k);
$tpl->setVariable("TXT_ENTRY", $v["txt"]);
$tpl->setVariable("IDX_ENTRY", ++$cnt);
if ($v["selected"])
{
$tpl->setVariable("CHECKED", "checked='checked'");
}
$tpl->parseCurrentBlock();
}
$tpl->setVariable("ID", $this->getId());
$tpl->setVariable("HIDDEN_VAR", $this->getHiddenVar());
$tpl->setVariable("CMD_SUBMIT", $this->getFormCmd());
$tpl->setVariable("VAL_SUBMIT", $lng->txt("refresh"));
return $tpl->get();
}

+ Here is the call graph for this function:

ilCheckboxListOverlayGUI::getId ( )

Get id.

Returns
string id

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

Referenced by getHTML().

{
return $this->id;
}

+ Here is the caller graph for this function:

ilCheckboxListOverlayGUI::getItems ( )

Get items.

Returns
array items

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

References $items.

Referenced by getHTML().

{
return $this->items;
}

+ Here is the caller graph for this function:

ilCheckboxListOverlayGUI::getLinkTitle ( )

Get link title.

Returns
string link title

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

Referenced by getHTML().

{
return $this->link_title;
}

+ Here is the caller graph for this function:

ilCheckboxListOverlayGUI::getSelectionHeaderClass ( )

Get Selection Header Class.

Returns
string Selection Header Class

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

{
return $this->selectionheaderclass;
}
ilCheckboxListOverlayGUI::setFieldVar (   $a_val)

Set field var.

Parameters
stringfield var

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

{
$this->field_var = $a_val;
}
ilCheckboxListOverlayGUI::setFormCmd (   $a_val)

Set form command.

Parameters
stringform command

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

{
$this->form_cmd = $a_val;
}
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.

{
$this->hidden_var = $a_val;
}
ilCheckboxListOverlayGUI::setId (   $a_val)

Set id.

Parameters
stringid

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

Referenced by __construct().

{
$this->id = $a_val;
}

+ Here is the caller graph for this function:

ilCheckboxListOverlayGUI::setItems (   $a_val)

Set items.

Parameters
arrayitems

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

{
$this->items = $a_val;
}
ilCheckboxListOverlayGUI::setLinkTitle (   $a_val)

Set link title.

Parameters
stringlink title

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

{
$this->link_title = $a_val;
}
ilCheckboxListOverlayGUI::setSelectionHeaderClass (   $a_selectionheaderclass)

Set Selection Header Class.

Parameters
string$a_selectionheaderclassSelection Header Class

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

{
$this->selectionheaderclass = $a_selectionheaderclass;
}

Field Documentation

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: