ILIAS
Release_5_0_x_branch Revision 61816
|
ADT form bridge base class. More...
Public Member Functions | |
__construct (ilADT $a_adt) | |
Constructor. | |
getADT () | |
Get ADT. | |
setForm (ilPropertyFormGUI $a_form) | |
Set form. | |
getForm () | |
Get form. | |
setElementId ($a_value) | |
Set element id (aka form field) | |
getElementId () | |
Get element id. | |
setTitle ($a_value) | |
Set title (aka form field caption) | |
getTitle () | |
Get title. | |
setInfo ($a_value) | |
Set info (aka form field info text) | |
getInfo () | |
Get info. | |
setParentElement ($a_value) | |
Set parent element. | |
getParentElement () | |
Get parent element. | |
setDisabled ($a_value) | |
Set disabled. | |
isDisabled () | |
Get disabled. | |
setRequired ($a_value) | |
Set required. | |
isRequired () | |
Get required. | |
addToForm () | |
Add ADT-specific fields to form. | |
addJS (ilTemplate $a_tpl) | |
Add ADT-specific JS-files to template. | |
shouldBeImportedFromPost (ilADTFormBridge $a_parent_adt=null) | |
Check if incoming values should be imported at all. | |
importFromPost () | |
Import values from form request POST data. | |
validate () | |
Validate ADT and parse error codes. | |
setExternalErrors ($a_errors) |
Protected Member Functions | |
isValidADT (ilADT $a_adt) | |
Check if given ADT is valid. | |
setADT (ilADT $a_adt) | |
Set ADT. | |
addBasicFieldProperties (ilFormPropertyGUI $a_field, ilADTDefinition $a_def) | |
Helper method to handle generic properties like setRequired(), setInfo() | |
findParentElementInForm () | |
Try to find parent element in form (could be option) | |
addToParentElement (ilFormPropertyGUI $a_field) | |
Add form field to parent element. | |
isActiveForSubItems ($a_parent_option=null) | |
Check if element is currently active for subitem(s) |
Protected Attributes | |
$adt | |
$form | |
$id | |
$title | |
$info | |
$parent_element | |
$required | |
$disabled |
ilADTFormBridge::__construct | ( | ilADT | $a_adt | ) |
Constructor.
ilADT | $a_adt |
Definition at line 28 of file class.ilADTFormBridge.php.
References setADT().
|
protected |
Helper method to handle generic properties like setRequired(), setInfo()
ilFormPropertyGUI | $a_field | |
ilADTDefinition | $a_def |
Definition at line 229 of file class.ilADTFormBridge.php.
References $info, getInfo(), isDisabled(), isRequired(), ilFormPropertyGUI\setDisabled(), ilFormPropertyGUI\setInfo(), and ilFormPropertyGUI\setRequired().
Referenced by ilADTBooleanFormBridge\addToForm(), ilADTFloatFormBridge\addToForm(), ilADTMultiTextFormBridge\addToForm(), ilADTIntegerFormBridge\addToForm(), ilADTLocationFormBridge\addToForm(), ilADTMultiEnumFormBridge\addToForm(), ilADTDateTimeFormBridge\addToForm(), ilADTEnumFormBridge\addToForm(), ilADTDateFormBridge\addToForm(), and ilADTTextFormBridge\addToForm().
ilADTFormBridge::addJS | ( | ilTemplate | $a_tpl | ) |
Add ADT-specific JS-files to template.
ilTemplate | $a_tpl |
Reimplemented in ilADTGroupFormBridge.
Definition at line 317 of file class.ilADTFormBridge.php.
|
abstract |
Add ADT-specific fields to form.
Reimplemented in ilADTGroupFormBridge, ilADTTextFormBridge, ilADTDateFormBridge, ilADTEnumFormBridge, ilADTDateTimeFormBridge, ilADTMultiEnumFormBridge, ilADTBooleanFormBridge, ilADTFloatFormBridge, ilADTIntegerFormBridge, ilADTLocationFormBridge, and ilADTMultiTextFormBridge.
|
protected |
Add form field to parent element.
ilFormPropertyGUI | $a_field |
Definition at line 294 of file class.ilADTFormBridge.php.
References findParentElementInForm(), and getForm().
Referenced by ilADTBooleanFormBridge\addToForm(), ilADTFloatFormBridge\addToForm(), ilADTMultiTextFormBridge\addToForm(), ilADTIntegerFormBridge\addToForm(), ilADTLocationFormBridge\addToForm(), ilADTMultiEnumFormBridge\addToForm(), ilADTDateTimeFormBridge\addToForm(), ilADTEnumFormBridge\addToForm(), ilADTDateFormBridge\addToForm(), and ilADTTextFormBridge\addToForm().
|
protected |
Try to find parent element in form (could be option)
Definition at line 252 of file class.ilADTFormBridge.php.
References getForm(), and getParentElement().
Referenced by addToParentElement().
ilADTFormBridge::getADT | ( | ) |
Get ADT.
Definition at line 69 of file class.ilADTFormBridge.php.
References $adt.
Referenced by ilADTBooleanFormBridge\addToForm(), ilADTIntegerFormBridge\addToForm(), ilADTLocationFormBridge\addToForm(), ilADTFloatFormBridge\addToForm(), ilADTMultiTextFormBridge\addToForm(), ilADTMultiEnumFormBridge\addToForm(), ilADTDateTimeFormBridge\addToForm(), ilADTEnumFormBridge\addToForm(), ilADTDateFormBridge\addToForm(), ilADTTextFormBridge\addToForm(), ilADTMultiTextFormBridge\importFromPost(), ilADTBooleanFormBridge\importFromPost(), ilADTMultiEnumFormBridge\importFromPost(), ilADTIntegerFormBridge\importFromPost(), ilADTDateTimeFormBridge\importFromPost(), ilADTFloatFormBridge\importFromPost(), ilADTDateFormBridge\importFromPost(), ilADTLocationFormBridge\importFromPost(), ilADTEnumFormBridge\importFromPost(), ilADTTextFormBridge\importFromPost(), ilADTBooleanFormBridge\isActiveForSubItems(), ilADTMultiEnumFormBridge\isActiveForSubItems(), ilADTEnumFormBridge\isActiveForSubItems(), isActiveForSubItems(), ilADTGroupFormBridge\prepareElements(), ilADTGroupFormBridge\validate(), and validate().
ilADTFormBridge::getElementId | ( | ) |
Get element id.
Definition at line 109 of file class.ilADTFormBridge.php.
References $id.
Referenced by ilADTDateFormBridge\addToElementId(), ilADTBooleanFormBridge\addToForm(), ilADTLocationFormBridge\addToForm(), ilADTMultiTextFormBridge\addToForm(), ilADTFloatFormBridge\addToForm(), ilADTIntegerFormBridge\addToForm(), ilADTMultiEnumFormBridge\addToForm(), ilADTDateTimeFormBridge\addToForm(), ilADTEnumFormBridge\addToForm(), ilADTDateFormBridge\addToForm(), ilADTTextFormBridge\addToForm(), ilADTMultiTextFormBridge\importFromPost(), ilADTBooleanFormBridge\importFromPost(), ilADTMultiEnumFormBridge\importFromPost(), ilADTDateTimeFormBridge\importFromPost(), ilADTIntegerFormBridge\importFromPost(), ilADTFloatFormBridge\importFromPost(), ilADTDateFormBridge\importFromPost(), ilADTLocationFormBridge\importFromPost(), ilADTEnumFormBridge\importFromPost(), ilADTTextFormBridge\importFromPost(), setExternalErrors(), and validate().
ilADTFormBridge::getForm | ( | ) |
Get form.
Definition at line 89 of file class.ilADTFormBridge.php.
References $form.
Referenced by ilADTGroupFormBridge\addToForm(), addToParentElement(), findParentElementInForm(), ilADTMultiTextFormBridge\importFromPost(), ilADTBooleanFormBridge\importFromPost(), ilADTMultiEnumFormBridge\importFromPost(), ilADTDateTimeFormBridge\importFromPost(), ilADTIntegerFormBridge\importFromPost(), ilADTFloatFormBridge\importFromPost(), ilADTDateFormBridge\importFromPost(), ilADTLocationFormBridge\importFromPost(), ilADTEnumFormBridge\importFromPost(), ilADTTextFormBridge\importFromPost(), ilADTGroupFormBridge\prepareElements(), ilADTTestGUI\prepareFormElements(), setExternalErrors(), ilADTGroupFormBridge\validate(), and validate().
ilADTFormBridge::getInfo | ( | ) |
Get info.
Definition at line 149 of file class.ilADTFormBridge.php.
References $info.
Referenced by addBasicFieldProperties(), and ilADTGroupFormBridge\addToForm().
ilADTFormBridge::getParentElement | ( | ) |
Get parent element.
Definition at line 173 of file class.ilADTFormBridge.php.
Referenced by findParentElementInForm(), and shouldBeImportedFromPost().
ilADTFormBridge::getTitle | ( | ) |
Get title.
Definition at line 129 of file class.ilADTFormBridge.php.
References $title.
Referenced by ilADTBooleanFormBridge\addToForm(), ilADTFloatFormBridge\addToForm(), ilADTLocationFormBridge\addToForm(), ilADTMultiTextFormBridge\addToForm(), ilADTIntegerFormBridge\addToForm(), ilADTMultiEnumFormBridge\addToForm(), ilADTDateTimeFormBridge\addToForm(), ilADTEnumFormBridge\addToForm(), ilADTDateFormBridge\addToForm(), ilADTGroupFormBridge\addToForm(), and ilADTTextFormBridge\addToForm().
|
abstract |
Import values from form request POST data.
Reimplemented in ilADTTextFormBridge, ilADTGroupFormBridge, ilADTEnumFormBridge, ilADTLocationFormBridge, ilADTDateFormBridge, ilADTFloatFormBridge, ilADTDateTimeFormBridge, ilADTIntegerFormBridge, ilADTMultiEnumFormBridge, ilADTBooleanFormBridge, and ilADTMultiTextFormBridge.
|
protected |
Check if element is currently active for subitem(s)
mixed | $a_parent_option |
Reimplemented in ilADTEnumFormBridge, ilADTMultiEnumFormBridge, and ilADTBooleanFormBridge.
Definition at line 328 of file class.ilADTFormBridge.php.
References getADT().
ilADTFormBridge::isDisabled | ( | ) |
Get disabled.
Definition at line 193 of file class.ilADTFormBridge.php.
References $disabled.
Referenced by addBasicFieldProperties(), and shouldBeImportedFromPost().
ilADTFormBridge::isRequired | ( | ) |
Get required.
Definition at line 213 of file class.ilADTFormBridge.php.
References $required.
Referenced by addBasicFieldProperties(), ilADTLocationFormBridge\addToForm(), ilADTDateTimeFormBridge\addToForm(), ilADTEnumFormBridge\addToForm(), ilADTDateFormBridge\addToForm(), ilADTDateTimeFormBridge\importFromPost(), ilADTDateFormBridge\importFromPost(), ilADTLocationFormBridge\importFromPost(), and validate().
|
abstractprotected |
Check if given ADT is valid.
:TODO: This could be avoided with type-specifc constructors :TODO: bridge base class?
ilADT | $a_adt |
Reimplemented in ilADTTextFormBridge, ilADTDateFormBridge, ilADTDateTimeFormBridge, ilADTEnumFormBridge, ilADTGroupFormBridge, ilADTMultiEnumFormBridge, ilADTBooleanFormBridge, ilADTFloatFormBridge, ilADTIntegerFormBridge, ilADTLocationFormBridge, and ilADTMultiTextFormBridge.
Referenced by setADT().
|
protected |
Set ADT.
Exception |
ilADT | $a_adt |
Definition at line 54 of file class.ilADTFormBridge.php.
References isValidADT().
Referenced by __construct().
ilADTFormBridge::setDisabled | ( | $a_value | ) |
Set disabled.
bool | $a_value |
Definition at line 183 of file class.ilADTFormBridge.php.
ilADTFormBridge::setElementId | ( | $a_value | ) |
Set element id (aka form field)
string | $a_value |
Definition at line 99 of file class.ilADTFormBridge.php.
ilADTFormBridge::setExternalErrors | ( | $a_errors | ) |
Definition at line 402 of file class.ilADTFormBridge.php.
References getElementId(), and getForm().
ilADTFormBridge::setForm | ( | ilPropertyFormGUI | $a_form | ) |
Set form.
ilPropertyFormGUI | $a_form |
Definition at line 79 of file class.ilADTFormBridge.php.
ilADTFormBridge::setInfo | ( | $a_value | ) |
Set info (aka form field info text)
string | $a_value |
Definition at line 139 of file class.ilADTFormBridge.php.
Referenced by ilADTTestGUI\prepareFormElements().
ilADTFormBridge::setParentElement | ( | $a_value | ) |
Set parent element.
string | array | $a_value |
Definition at line 159 of file class.ilADTFormBridge.php.
ilADTFormBridge::setRequired | ( | $a_value | ) |
Set required.
bool | $a_value |
Definition at line 203 of file class.ilADTFormBridge.php.
ilADTFormBridge::setTitle | ( | $a_value | ) |
Set title (aka form field caption)
string | $a_value |
Definition at line 119 of file class.ilADTFormBridge.php.
Referenced by ilADTTestGUI\prepareFormElements().
ilADTFormBridge::shouldBeImportedFromPost | ( | ilADTFormBridge | $a_parent_adt = null | ) |
Check if incoming values should be imported at all.
ilADTFormBridge | $a_parent_adt |
Definition at line 339 of file class.ilADTFormBridge.php.
References $parent_element, getParentElement(), and isDisabled().
ilADTFormBridge::validate | ( | ) |
Validate ADT and parse error codes.
Reimplemented in ilADTGroupFormBridge, ilADTDateFormBridge, ilADTDateTimeFormBridge, and ilADTBooleanFormBridge.
Definition at line 371 of file class.ilADTFormBridge.php.
References $lng, getADT(), getElementId(), getForm(), and isRequired().
|
protected |
Definition at line 13 of file class.ilADTFormBridge.php.
Referenced by ilADTLocationFormBridge\addToForm(), and getADT().
|
protected |
Definition at line 20 of file class.ilADTFormBridge.php.
Referenced by isDisabled().
|
protected |
Definition at line 14 of file class.ilADTFormBridge.php.
Referenced by getForm().
|
protected |
Definition at line 15 of file class.ilADTFormBridge.php.
Referenced by getElementId().
|
protected |
Definition at line 17 of file class.ilADTFormBridge.php.
Referenced by addBasicFieldProperties(), and getInfo().
|
protected |
Definition at line 18 of file class.ilADTFormBridge.php.
Referenced by shouldBeImportedFromPost().
|
protected |
Definition at line 19 of file class.ilADTFormBridge.php.
Referenced by isRequired().
|
protected |
Definition at line 16 of file class.ilADTFormBridge.php.
Referenced by ilADTLocationFormBridge\addToForm(), and getTitle().