ILIAS  Release_5_0_x_branch Revision 61816
 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.
 hideSubForm ()
 Sub form hidden on init?
 render ($a_mode= '')
 Render item.
 insert (&$a_tpl)
 Insert property html.
 getTableFilterHTML ()
 Get HTML for table filter.
 serializeData ()
 serialize data
 unserializeData ($a_data)
 unserialize data
 getToolbarHTML ()
 Get HTML for toolbar.
- Public Member Functions inherited from ilSubEnabledFormPropertyGUI
 addSubItem ($a_item)
 Add Subitem.
 getSubItems ()
 Get Subitems.
 getSubInputItemsRecursive ()
 returns a flat array of possibly existing subitems recursively
 checkSubItemsInput ()
 Check SubItems.
 getSubForm ()
 Get sub form html.
 getItemByPostVar ($a_post_var)
 Get item by post var.
- Public Member Functions inherited from ilFormPropertyGUI
executeCommand ()
 Execute command.
 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.
 setParentForm ($a_parentform)
 Set Parent Form.
 getParentForm ()
 Get Parent Form.
 setParent ($a_val)
 Set Parent GUI object.
 getParent ()
 Get Parent GUI object.
 setHiddenTitle ($a_val)
 Set hidden title (for screenreaders)
 getHiddenTitle ()
 Get hidden title.
 writeToSession ()
 Write to session.
 clearFromSession ()
 Clear session value.
 readFromSession ()
 Read from session.
 getHiddenTag ($a_post_var, $a_value)
 Get hidden tag (used for disabled properties)
 setMulti ($a_multi, $a_sortable=false, $a_addremove=true)
 Set Multi.
 getMulti ()
 Get Multi.
 setMultiValues (array $a_values)
 Set multi values.
 getMultiValues ()
 Get multi values.
 getContentOutsideFormTag ()
 Get content that has to reside outside of the parent form tag, e.g.

Protected Attributes

 $value = "1"
 $checked
 $optiontitle = ""
 $additional_attributes = ''
- Protected Attributes inherited from ilSubEnabledFormPropertyGUI
 $sub_items = array()
- Protected Attributes inherited from ilFormPropertyGUI
 $type
 $title
 $postvar
 $info
 $alert
 $required = false
 $parentgui
 $parentform
 $hidden_title = ""
 $multi = false
 $multi_sortable = false
 $multi_addremove = true
 $multi_values

Additional Inherited Members

- Protected Member Functions inherited from ilFormPropertyGUI
 setType ($a_type)
 Set Type.
 getMultiIconsHTML ()
 Get HTML for multiple value icons.

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 33 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 46 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.

Reimplemented in ilDclCheckboxInputGUI.

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

References $_POST, $lng, $ok, ilSubEnabledFormPropertyGUI\checkSubItemsInput(), ilFormPropertyGUI\getPostVar(), and ilUtil\stripSlashes().

{
global $lng;
$_POST[$this->getPostVar()] =
// getRequired() is NOT processed here!
$ok = $this->checkSubItemsInput();
// only not ok, if checkbox not checked
if (!$ok && $_POST[$this->getPostVar()] == "")
{
$ok = true;
}
return $ok;
}

+ Here is the call graph for this function:

ilCheckboxInputGUI::getAdditionalAttributes ( )

get addtional attributes

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

References $additional_attributes.

Referenced by render().

+ Here is the caller graph for this function:

ilCheckboxInputGUI::getChecked ( )

Get Checked.

Returns
boolean Checked

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

References $checked.

Referenced by hideSubForm(), render(), and serializeData().

{
}

+ Here is the caller graph for this function:

ilCheckboxInputGUI::getOptionTitle ( )

Get Option Title (optional).

Returns
string Option Title (optional)

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

References $optiontitle.

Referenced by render().

{
}

+ Here is the caller graph for this function:

ilCheckboxInputGUI::getTableFilterHTML ( )

Get HTML for table filter.

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

References render().

{
$html = $this->render();
return $html;
}

+ Here is the call graph for this function:

ilCheckboxInputGUI::getToolbarHTML ( )

Get HTML for toolbar.

Implements ilToolbarItem.

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

References render().

{
$html = $this->render('toolbar');
return $html;
}

+ Here is the call graph for this function:

ilCheckboxInputGUI::getValue ( )

Get Value.

Returns
string Value

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

References $value.

Referenced by render().

{
return $this->value;
}

+ Here is the caller graph for this function:

ilCheckboxInputGUI::hideSubForm ( )

Sub form hidden on init?

Reimplemented from ilFormPropertyGUI.

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

References getChecked().

{
return !$this->getChecked();
}

+ Here is the call graph for this function:

ilCheckboxInputGUI::insert ( $a_tpl)

Insert property html.

Returns
int Size

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

References render().

{
$html = $this->render();
$a_tpl->setCurrentBlock("prop_generic");
$a_tpl->setVariable("PROP_GENERIC", $html);
$a_tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

ilCheckboxInputGUI::render (   $a_mode = '')

Render item.

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

References $tpl, getAdditionalAttributes(), getChecked(), ilFormPropertyGUI\getDisabled(), ilFormPropertyGUI\getFieldId(), getOptionTitle(), ilFormPropertyGUI\getPostVar(), and getValue().

Referenced by getTableFilterHTML(), getToolbarHTML(), and insert().

{
$tpl = new ilTemplate("tpl.prop_checkbox.html", true, true, "Services/Form");
$tpl->setVariable("POST_VAR", $this->getPostVar());
$tpl->setVariable("ID", $this->getFieldId());
$tpl->setVariable("PROPERTY_VALUE", $this->getValue());
$tpl->setVariable("OPTION_TITLE", $this->getOptionTitle());
if(strlen($this->getAdditionalAttributes()))
{
$tpl->setVariable('PROP_CHECK_ATTRS',$this->getAdditionalAttributes());
}
if ($this->getChecked())
{
$tpl->setVariable("PROPERTY_CHECKED",
'checked="checked"');
}
if ($this->getDisabled())
{
$tpl->setVariable("DISABLED",
'disabled="disabled"');
}
if ($a_mode == "toolbar")
{
// block-inline hack, see: http://blog.mozilla.com/webdev/2009/02/20/cross-browser-inline-block/
// -moz-inline-stack for FF2
// zoom 1; *display:inline for IE6 & 7
$tpl->setVariable("STYLE_PAR", 'display: -moz-inline-stack; display:inline-block; zoom: 1; *display:inline;');
}
return $tpl->get();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilCheckboxInputGUI::serializeData ( )

serialize data

Reimplemented from ilFormPropertyGUI.

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

References getChecked().

{
return serialize($this->getChecked());
}

+ Here is the call graph for this function:

ilCheckboxInputGUI::setAdditionalAttributes (   $a_attrs)

Set addiotional attributes.

Parameters
string$a_attrsaddition attribute string

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

{
$this->additional_attributes = $a_attrs;
}
ilCheckboxInputGUI::setChecked (   $a_checked)

Set Checked.

Parameters
boolean$a_checkedChecked

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

Referenced by ilCourseContentGUI\__showUserAcceptanceTable(), ilObjTestSettingsGeneralGUI\addAvailabilityProperties(), ilObjTestSettingsGeneralGUI\addQuestionBehaviourProperties(), ilObjTestSettingsGeneralGUI\addTestAccessProperties(), ilObjTestSettingsGeneralGUI\addTestFinishProperties(), ilObjTestSettingsGeneralGUI\addTestIntroProperties(), ilAdvancedMDFieldDefinition\addToFieldDefinitionForm(), ilObjSystemFolderGUI\benchmarkObject(), ilTestScoringGUI\buildManScoringParticipantForm(), ilCertificateGUI\certificateEditor(), ilObjExternalToolsSettingsGUI\editMapsObject(), ilObjExternalToolsSettingsGUI\editMathJaxObject(), ilObjPaymentSettingsGUI\editPriceObject(), ilObjPersonalDesktopSettingsGUI\editSettings(), ilObjExerciseGUI\initAssignmentForm(), ilSetupGUI\initDbSlaveForm(), ilObjRootFolderGUI\initEditForm(), ilObjPortfolioGUI\initEditForm(), ilObjCourseGUI\initEditForm(), ilLearningProgressBaseGUI\initEditUserForm(), ilCalendarRecurrenceGUI\initForm(), ilAdvancedMDSettingsGUI\initForm(), ilObjUserGUI\initForm(), ilObjGroupGUI\initForm(), ilECSMappingSettingsGUI\initFormCSettings(), ilECSMappingSettingsGUI\initFormDSettings(), ilObjLinkResourceGUI\initFormLink(), ilObjRoleTemplateGUI\initFormRoleTemplate(), ilCASSettingsGUI\initFormSettings(), ilObjSearchSettingsGUI\initFormSettings(), ilObjAdvancedEditingGUI\initGeneralPageSettingsForm(), ilPersonalSettingsGUI\initGeneralSettingsForm(), ilObjSystemFolderGUI\initHTTPSForm(), ilObjContentObjectGUI\initMenuForm(), ilPDNewsBlockGUI\initPrivateSettingsForm(), ilObjSurveyGUI\initPropertiesForm(), ilObjRepositorySettingsGUI\initSettingsForm(), ilObjUserTrackingGUI\initSettingsForm(), ilECSSettingsGUI\initSettingsForm(), ilObjMDSettingsGUI\initSettingsForm(), ilObjTaxonomyGUI\initSettingsForm(), ilObjMediaCastGUI\initSettingsForm(), ilWikiPageTemplateGUI\listTemplates(), assKprimChoiceGUI\populateQuestionSpecificFormPart(), ilRadiusSettingsGUI\settings(), ilOpenIdSettingsGUI\settings(), ilObjCertificateSettingsGUI\settings(), ilObjAdvancedEditingGUI\settingsObject(), ilObjSurveyAdministrationGUI\settingsObject(), ilObjLanguageExtGUI\settingsObject(), setValueByArray(), ilConditionHandlerGUI\showObligatoryForm(), ilPersonalProfileGUI\showPublicProfileFields(), ilShopTopicsGUI\showTopicsSettings(), and unserializeData().

{
$this->checked = $a_checked;
}

+ Here is the caller graph for this function:

ilCheckboxInputGUI::setOptionTitle (   $a_optiontitle)
ilCheckboxInputGUI::setValue (   $a_value)

Set Value.

Parameters
string$a_valueValue

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

Referenced by ilSocialBookmarks\_initForm(), ilDAVCronDiskQuota\addCustomSettingsToForm(), SurveyMultipleChoiceQuestionGUI\addFieldsToEditForm(), SurveyMatrixQuestionGUI\addFieldsToEditForm(), ilObjTestSettingsGeneralGUI\addQuestionBehaviourProperties(), ilObjTestSettingsScoringResultsGUI\addResultDetailsSettingsFormSection(), ilECSObjectSettings\addSettingsToForm(), ilObjTestSettingsGeneralGUI\addTestAccessProperties(), ilObjTestSettingsGeneralGUI\addTestFinishProperties(), ilObjTestSettingsGeneralGUI\addTestIntroProperties(), ilObjTestSettingsGeneralGUI\addTestRunProperties(), ilObjTestSettingsGeneralGUI\addTestSequenceProperties(), ilObjTestDynamicQuestionSetConfigGUI\buildForm(), ilECSMappingSettingsGUI\dInitFormTreeSettings(), ilObjFileAccessSettingsGUI\editDownloadingSettings(), ilObjGroupGUI\editMapSettingsObject(), ilObjCourseGUI\editMapSettingsObject(), ilObjNewsSettingsGUI\editSettings(), ilObjPersonalDesktopSettingsGUI\editSettings(), ilObjSkillManagementGUI\editSettings(), ilObjFileAccessSettingsGUI\editWebDAVSettings(), ilObjPersonalDesktopSettingsGUI\editWsp(), SurveyQuestionGUI\initEditForm(), ilObjCourseGUI\initEditForm(), ilObjectCustomUserFieldsGUI\initFieldForm(), ilAdvancedSearchFilterGUI\initFilter(), ilObjMailGUI\initForm(), ilObjBibliographicAdminLibrariesFormGUI\initForm(), ilRegistrationSettingsGUI\initForm(), ilAttendanceList\initForm(), ilLDAPSettingsGUI\initForm(), ilObjUserGUI\initForm(), ilObjGroupGUI\initForm(), ilObjUserFolderGUI\initFormGeneralSettings(), ilObjLinkResourceGUI\initFormLink(), ilObjSearchSettingsGUI\initFormLuceneSettings(), ilObjRoleGUI\initFormRoleProperties(), ilObjPortfolioAdministrationGUI\initFormSettings(), ilObjTaggingSettingsGUI\initFormSettings(), ilObjSearchSettingsGUI\initFormSettings(), ilObjCalendarSettingsGUI\initFormSettings(), ilAdvancedMDSettingsGUI\initFormSubstitutions(), ilObjForumGUI\initForumCreateForm(), ilObjUserFolderGUI\initLoginSettingsForm(), ilObjForumGUI\initNotificationSettingsForm(), ilObjFileAccessSettingsGUI\initPreviewSettingsForm(), ilObjSCORM2004LearningModuleGUI\initPropertiesForm(), ilObjSurveyGUI\initPropertiesForm(), ilObjRepositorySettingsGUI\initSettingsForm(), ilLOEditorGUI\initSettingsForm(), ilObjGlossaryGUI\initSettingsForm(), ilSearchBaseGUI\initStandardSearchForm(), ilObjSAHSLearningModuleGUI\initUploadForm(), ilObjFileAccessSettingsGUI\initUploadSettingsForm(), ilObjLinkResourceGUI\linkChecker(), ilObjContentObjectGUI\linkChecker(), assClozeTestGUI\populateQuestionSpecificFormPart(), assSingleChoiceGUI\populateQuestionSpecificFormPart(), assMultipleChoiceGUI\populateQuestionSpecificFormPart(), assClozeTestGUI\populateSelectGapFormPart(), ilObjSCORMLearningModuleGUI\properties(), ilNotificationGUI\showSettingsObject(), and unserializeData().

{
$this->value = $a_value;
}

+ Here is the caller graph for this function:

ilCheckboxInputGUI::setValueByArray (   $a_values)

Set value by array.

Parameters
object$a_itemItem

Definition at line 117 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::unserializeData (   $a_data)

unserialize data

Reimplemented from ilFormPropertyGUI.

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

References setChecked(), and setValue().

{
$data = unserialize($a_data);
if ($data)
{
$this->setValue($data);
$this->setChecked(true);
}
}

+ Here is the call graph for this function:

Field Documentation

ilCheckboxInputGUI::$additional_attributes = ''
protected

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

Referenced by getAdditionalAttributes().

ilCheckboxInputGUI::$checked
protected

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

Referenced by getChecked().

ilCheckboxInputGUI::$optiontitle = ""
protected

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

Referenced by getOptionTitle().

ilCheckboxInputGUI::$value = "1"
protected

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

Referenced by getValue().


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