ILIAS  Release_4_2_x_branch Revision 61807
 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.
 setHeaderIcon ($a_headericon)
 Set Header Icon.
 getHeaderIcon ()
 Get Header Icon.
 setLinkTitle ($a_val)
 Set link title.
 getLinkTitle ()
 Get link title.
 setItems ($a_val)
 Set items.
 getItems ()
 Get items.
 setUrl ($a_val)
 Set url.
 getUrl ()
 Get url.
 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.

Data Fields

const DOWN_ARROW_LIGHT = "mm_down_arrow.gif"
const DOWN_ARROW_DARK = "mm_down_arrow_dark.gif"
const NO_ICON = ""

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 23 of file class.ilCheckboxListOverlayGUI.php.

References DOWN_ARROW_DARK, setHeaderIcon(), and setId().

+ Here is the call graph for this function:

Member Function Documentation

ilCheckboxListOverlayGUI::getFieldVar ( )

Get field var.

Returns
string field var

Definition at line 184 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 164 of file class.ilCheckboxListOverlayGUI.php.

Referenced by getHTML().

{
return $this->form_cmd;
}

+ Here is the caller graph for this function:

ilCheckboxListOverlayGUI::getHeaderIcon ( )

Get Header Icon.

Returns
string Header Icon

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

Referenced by getHTML().

{
return $this->headericon;
}

+ Here is the caller graph for this function:

ilCheckboxListOverlayGUI::getHiddenVar ( )

Get hidden var.

Returns
string hidden var

Definition at line 204 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 211 of file class.ilCheckboxListOverlayGUI.php.

References $GLOBALS, $items, $lng, $tpl, DOWN_ARROW_DARK, DOWN_ARROW_LIGHT, getFieldVar(), getFormCmd(), getHeaderIcon(), getHiddenVar(), getId(), ilUtil\getImagePath(), getItems(), getLinkTitle(), getSelectionHeaderClass(), and getUrl().

{
global $lng;
$items = $this->getItems();
$GLOBALS["tpl"]->addJavascript("./Services/UIComponent/CheckboxListOverlay/js/ilCheckboxListOverlay.js");
include_once("./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php");
$overlay = new ilOverlayGUI("ilChkboxListOverlay_".$this->getId());
$overlay->setAnchor("ilChkboxListAnchorEl_".$this->getId());
$overlay->setTrigger("ilChkboxListTrigger_".$this->getId());
//$overlay->setSize("300px", "300px");
$overlay->add();
$tpl = new ilTemplate("tpl.checkbox_list_overlay.html", true, true,
"Services/UIComponent/CheckboxListOverlay", "DEFAULT", false, true);
$tpl->setCurrentBlock("top_img");
switch ($this->getHeaderIcon())
{
$tpl->setVariable("IMG_DOWN",
break;
$tpl->setVariable("IMG_DOWN",
break;
default:
$tpl->setVariable("IMG_DOWN", $this->getHeaderIcon());
break;
}
// do not repeat title (accessibility) -> empty alt
$tpl->setVariable("TXT_SEL_TOP", $this->getLinkTitle());
$tpl->setVariable("ALT_SEL_TOP", "");
$tpl->setVariable("CLASS_SEL_TOP", $this->getSelectionHeaderClass());
$tpl->parseCurrentBlock();
reset($items);
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"]);
if ($v["selected"])
{
$tpl->setVariable("CHECKED", "checked='checked'");
}
$tpl->parseCurrentBlock();
}
if ($this->getUrl() != "")
{
$tpl->setVariable("ONCLICK",
"onclick=\"return ilCheckboxListOverlay.save('".
$this->getUrl()."', '".$this->getFieldVar()."');\"");
}
$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 44 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 104 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 84 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 144 of file class.ilCheckboxListOverlayGUI.php.

Referenced by getHTML().

{
return $this->selectionheaderclass;
}

+ Here is the caller graph for this function:

ilCheckboxListOverlayGUI::getUrl ( )

Get url.

Returns
string url

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

Referenced by getHTML().

{
return $this->url;
}

+ Here is the caller graph for this function:

ilCheckboxListOverlayGUI::setFieldVar (   $a_val)

Set field var.

Parameters
stringfield var

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

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

Set form command.

Parameters
stringform command

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

{
$this->form_cmd = $a_val;
}
ilCheckboxListOverlayGUI::setHeaderIcon (   $a_headericon)

Set Header Icon.

Parameters
string$a_headericonHeader Icon

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

Referenced by __construct().

{
$this->headericon = $a_headericon;
}

+ Here is the caller graph for this function:

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 194 of file class.ilCheckboxListOverlayGUI.php.

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

Set id.

Parameters
stringid

Definition at line 34 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 94 of file class.ilCheckboxListOverlayGUI.php.

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

Set link title.

Parameters
stringlink title

Definition at line 74 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 134 of file class.ilCheckboxListOverlayGUI.php.

{
$this->selectionheaderclass = $a_selectionheaderclass;
}
ilCheckboxListOverlayGUI::setUrl (   $a_val)

Set url.

Parameters
stringurl

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

{
$this->url = $a_val;
}

Field Documentation

ilCheckboxListOverlayGUI::$items = array()
private

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

Referenced by getHTML(), and getItems().

const ilCheckboxListOverlayGUI::DOWN_ARROW_DARK = "mm_down_arrow_dark.gif"

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

Referenced by __construct(), and getHTML().

const ilCheckboxListOverlayGUI::DOWN_ARROW_LIGHT = "mm_down_arrow.gif"

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

Referenced by getHTML().

const ilCheckboxListOverlayGUI::NO_ICON = ""

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


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