ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilCheckboxInputGUI Class Reference

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.
 setAdditionalAttributes ($a_attrs)
 Set addiotional attributes.
 getAdditionalAttributes ()
 get addtional attributes
 checkInput ()
 Check input, strip slashes etc.
 insert (&$a_tpl)
 Insert property html.
- Public Member Functions inherited from ilSubEnabledFormPropertyGUI
 addSubItem ($a_item)
 Add Subitem.
 getSubItems ()
 Get Subitems.
 setSubformMode ($a_subformmode)
 Set Subform Mode.
 getSubformMode ()
 Get Subform Mode.
 checkSubItemsInput ()
 Check SubItems.
 getSubForm ()
 Get sub form html.
- Public Member Functions inherited from ilFormPropertyGUI
 getType ()
 Get Type.
 setTitle ($a_title)
 Set Title.
 getTitle ()
 Get Title.
 setPostVar ($a_postvar)
 Set Post Variable.
 getPostVar ()
 Get Post Variable.
 getFieldId ()
 Get Post Variable.
 setInfo ($a_info)
 Set Information Text.
 getInfo ()
 Get Information Text.
 setAlert ($a_alert)
 Set Alert Text.
 getAlert ()
 Get Alert Text.
 setRequired ($a_required)
 Set Required.
 getRequired ()
 Get Required.
 setDisabled ($a_disabled)
 Set Disabled.
 getDisabled ()
 Get Disabled.

Protected Attributes

 $value = "1"
 $checked
 $optiontitle = ""
 $additional_attributes = ''
- Protected Attributes inherited from ilSubEnabledFormPropertyGUI
 $sub_items = array()
 $subformmode = "bottom"
- Protected Attributes inherited from ilFormPropertyGUI
 $type
 $title
 $postvar
 $info
 $alert
 $required = false

Additional Inherited Members

- Protected Member Functions inherited from ilFormPropertyGUI
 setType ($a_type)
 Set Type.

Detailed Description

This class represents a checkbox property in a property form.

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

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

Constructor & Destructor Documentation

ilCheckboxInputGUI::__construct (   $a_title = "",
  $a_postvar = "" 
)

Constructor.

Parameters
string$a_titleTitle
string$a_postvarPost Variable

Reimplemented from ilFormPropertyGUI.

Definition at line 44 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:

Member Function Documentation

ilCheckboxInputGUI::checkInput ( )

Check input, strip slashes etc.

set alert, if input is not ok.

Returns
boolean Input ok, true/false

Reimplemented from ilFormPropertyGUI.

Definition at line 148 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::getAdditionalAttributes ( )

get addtional attributes

Definition at line 138 of file class.ilCheckboxInputGUI.php.

References $additional_attributes.

Referenced by insert().

+ Here is the caller graph for this function:

ilCheckboxInputGUI::getChecked ( )

Get Checked.

Returns
boolean Checked

Definition at line 85 of file class.ilCheckboxInputGUI.php.

References $checked.

Referenced by insert().

{
}

+ Here is the caller graph for this function:

ilCheckboxInputGUI::getOptionTitle ( )

Get Option Title (optional).

Returns
string Option Title (optional)

Definition at line 105 of file class.ilCheckboxInputGUI.php.

References $optiontitle.

Referenced by insert().

{
}

+ Here is the caller graph for this function:

ilCheckboxInputGUI::getValue ( )

Get Value.

Returns
string Value

Definition at line 65 of file class.ilCheckboxInputGUI.php.

References $value.

Referenced by insert().

{
return $this->value;
}

+ Here is the caller graph for this function:

ilCheckboxInputGUI::insert ( $a_tpl)

Insert property html.

Definition at line 163 of file class.ilCheckboxInputGUI.php.

References getAdditionalAttributes(), getChecked(), ilFormPropertyGUI\getDisabled(), 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(strlen($this->getAdditionalAttributes()))
{
$a_tpl->setVariable('PROP_CHECK_ATTRS',$this->getAdditionalAttributes());
}
if ($this->getChecked())
{
$a_tpl->setVariable("PROPERTY_CHECKED",
'checked="checked"');
}
if ($this->getDisabled())
{
$a_tpl->setVariable("DISABLED",
'disabled="disabled"');
}
$a_tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

ilCheckboxInputGUI::setAdditionalAttributes (   $a_attrs)

Set addiotional attributes.

Parameters
string$a_attrsaddition attribute string

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

{
$this->additional_attributes = $a_attrs;
}
ilCheckboxInputGUI::setOptionTitle (   $a_optiontitle)

Set Option Title (optional).

Parameters
string$a_optiontitleOption Title (optional)

Definition at line 95 of file class.ilCheckboxInputGUI.php.

Referenced by ilObjSessionGUI\initAttendanceForm(), ilObjChatServerGUI\initForm(), ilObjGroupGUI\initForm(), ilObjExerciseGUI\initPropertiesForm(), and ilObjPrivacySecurityGUI\showSecurity().

{
$this->optiontitle = $a_optiontitle;
}

+ Here is the caller graph for this function:

ilCheckboxInputGUI::setValueByArray (   $a_values)

Set value by array.

Parameters
object$a_itemItem

Definition at line 115 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:

Field Documentation

ilCheckboxInputGUI::$additional_attributes = ''
protected

Definition at line 36 of file class.ilCheckboxInputGUI.php.

Referenced by getAdditionalAttributes().

ilCheckboxInputGUI::$checked
protected

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

Referenced by getChecked().

ilCheckboxInputGUI::$optiontitle = ""
protected

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

Referenced by getOptionTitle().

ilCheckboxInputGUI::$value = "1"
protected

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

Referenced by getValue().


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