This class represents a checkbox property in a property form. More...
Inheritance diagram for ilCheckboxInputGUI:
Collaboration diagram for ilCheckboxInputGUI:Public Member Functions | |
| __construct ($a_title="", $a_postvar="") | |
| Constructor. | |
| setValue ($a_value) | |
| Set Value. | |
| getValue () | |
| Get Value. | |
| setChecked ($a_checked) | |
| Set Checked. | |
| getChecked () | |
| Get Checked. | |
| setOptionTitle ($a_optiontitle) | |
| Set Option Title (optional). | |
| getOptionTitle () | |
| Get Option Title (optional). | |
| setValueByArray ($a_values) | |
| Set value by array. | |
| checkInput () | |
| Check input, strip slashes etc. | |
| insert (&$a_tpl) | |
| Insert property html. | |
Protected Attributes | |
| $value = "1" | |
| $checked | |
| $optiontitle = "" | |
This class represents a checkbox property in a property form.
Definition at line 31 of file class.ilCheckboxInputGUI.php.
| ilCheckboxInputGUI::__construct | ( | $ | a_title = "", |
|
| $ | a_postvar = "" | |||
| ) |
Constructor.
| string | $a_title Title | |
| string | $a_postvar Post Variable |
Reimplemented from ilFormPropertyGUI.
Definition at line 43 of file class.ilCheckboxInputGUI.php.
References ilFormPropertyGUI::setType().
{
parent::__construct($a_title, $a_postvar);
$this->setType("checkbox");
}
Here is the call graph for this function:| ilCheckboxInputGUI::checkInput | ( | ) |
Check input, strip slashes etc.
set alert, if input is not ok.
Reimplemented from ilFormPropertyGUI.
Definition at line 128 of file class.ilCheckboxInputGUI.php.
References $lng, $ok, ilSubEnabledFormPropertyGUI::checkSubItemsInput(), ilFormPropertyGUI::getPostVar(), and ilUtil::stripSlashes().
{
global $lng;
$_POST[$this->getPostVar()] =
ilUtil::stripSlashes($_POST[$this->getPostVar()]);
$ok = $this->checkSubItemsInput();
return $ok;
}
Here is the call graph for this function:| ilCheckboxInputGUI::getChecked | ( | ) |
Get Checked.
Definition at line 84 of file class.ilCheckboxInputGUI.php.
Referenced by insert().
{
return $this->checked;
}
Here is the caller graph for this function:| ilCheckboxInputGUI::getOptionTitle | ( | ) |
Get Option Title (optional).
Definition at line 104 of file class.ilCheckboxInputGUI.php.
Referenced by insert().
{
return $this->optiontitle;
}
Here is the caller graph for this function:| ilCheckboxInputGUI::getValue | ( | ) |
Get Value.
Definition at line 64 of file class.ilCheckboxInputGUI.php.
Referenced by insert().
{
return $this->value;
}
Here is the caller graph for this function:| ilCheckboxInputGUI::insert | ( | &$ | a_tpl | ) |
Insert property html.
Definition at line 143 of file class.ilCheckboxInputGUI.php.
References getChecked(), ilFormPropertyGUI::getFieldId(), getOptionTitle(), ilFormPropertyGUI::getPostVar(), and getValue().
{
$a_tpl->setCurrentBlock("prop_checkbox");
$a_tpl->setVariable("POST_VAR", $this->getPostVar());
$a_tpl->setVariable("ID", $this->getFieldId());
$a_tpl->setVariable("PROPERTY_VALUE", $this->getValue());
$a_tpl->setVariable("OPTION_TITLE", $this->getOptionTitle());
if ($this->getChecked())
{
$a_tpl->setVariable("PROPERTY_CHECKED",
'checked="checked"');
}
$a_tpl->parseCurrentBlock();
}
Here is the call graph for this function:| ilCheckboxInputGUI::setChecked | ( | $ | a_checked | ) |
Set Checked.
| boolean | $a_checked Checked |
Definition at line 74 of file class.ilCheckboxInputGUI.php.
Referenced by setValueByArray().
{
$this->checked = $a_checked;
}
Here is the caller graph for this function:| ilCheckboxInputGUI::setOptionTitle | ( | $ | a_optiontitle | ) |
Set Option Title (optional).
| string | $a_optiontitle Option Title (optional) |
Definition at line 94 of file class.ilCheckboxInputGUI.php.
{
$this->optiontitle = $a_optiontitle;
}
| ilCheckboxInputGUI::setValue | ( | $ | a_value | ) |
Set Value.
| string | $a_value Value |
Definition at line 54 of file class.ilCheckboxInputGUI.php.
{
$this->value = $a_value;
}
| ilCheckboxInputGUI::setValueByArray | ( | $ | a_values | ) |
Set value by array.
| object | $a_item Item |
Definition at line 114 of file class.ilCheckboxInputGUI.php.
References ilFormPropertyGUI::getPostVar(), ilSubEnabledFormPropertyGUI::getSubItems(), and setChecked().
{
$this->setChecked($a_values[$this->getPostVar()]);
foreach($this->getSubItems() as $item)
{
$item->setValueByArray($a_values);
}
}
Here is the call graph for this function:ilCheckboxInputGUI::$checked [protected] |
Definition at line 34 of file class.ilCheckboxInputGUI.php.
ilCheckboxInputGUI::$optiontitle = "" [protected] |
Definition at line 35 of file class.ilCheckboxInputGUI.php.
ilCheckboxInputGUI::$value = "1" [protected] |
Definition at line 33 of file class.ilCheckboxInputGUI.php.
1.7.1