Form.php
- package
- Form
- Classes
- Kwf_Form
Description
Container for all forms
Introduction to Forms: https://github.com/vivid-planet/koala-framework/wiki/Kwf_Form
\Kwf_Form
- Extends from
- \Kwf_Form_NonTableForm
- package
- Form
- Properties
- $_model
- $_modelName
- $_tableName
- Methods
- _afterInsert
- _afterSave
- _afterUpdate
- _beforeInsert
- _beforeSave
- _beforeUpdate
- _createMissingRow
- _getRowByParentRow
- _init
- _rowIsParentRow
- delete
- formatValidationErrors
- getHideForValue
- getMetaData
- getModel
- getPrimaryKey
- getRow
- hideForValue
- prepareSave
- processInput
- save
- setModel
Description
Container for all forms
Introduction to Forms: https://github.com/vivid-planet/koala-framework/wiki/Kwf_Form
Properties
$_model
$_model = ''
Details
- visibility
- protected
- default
- final
- false
- static
- false
$_modelName
$_modelName = ''
Details
- visibility
- protected
- default
- final
- false
- static
- false
$_tableName
$_tableName = ''
Details
- visibility
- protected
- default
- final
- false
- static
- false
Methods
_afterInsert
_afterInsert(
$row
)
:
Arguments
- $row
Details
- visibility
- protected
- final
- false
- static
- false
_afterSave
_afterSave(
$row
)
:
Arguments
- $row
Details
- visibility
- protected
- final
- false
- static
- false
_afterUpdate
_afterUpdate(
$row
)
:
Arguments
- $row
Details
- visibility
- protected
- final
- false
- static
- false
_beforeInsert
_beforeInsert(
$row
)
:
Arguments
- $row
Details
- visibility
- protected
- final
- false
- static
- false
_beforeSave
_beforeSave(
$row
)
:
Arguments
- $row
Details
- visibility
- protected
- final
- false
- static
- false
_beforeUpdate
_beforeUpdate(
$row
)
:
Arguments
- $row
Details
- visibility
- protected
- final
- false
- static
- false
_createMissingRow
_createMissingRow(
$id
)
:
Arguments
- $id
Details
- visibility
- protected
- final
- false
- static
- false
_getRowByParentRow
_getRowByParentRow(
$parentRow
)
:
Arguments
- $parentRow
Details
- visibility
- protected
- final
- false
- static
- false
_init
_init(
)
:
Override to add custom initialisation code
Details
- visibility
- protected
- final
- false
- static
- false
_rowIsParentRow
_rowIsParentRow(
$parentRow
)
:
Damit bei verschachtelten Forms die das selben Model verwenden nicht zwei unterschiedliche rows verwendet werden, was beim hinzufügen ein problem ist.
Wird aufgerufen von getRow, in Kwc_User_Edit_Form_Form wirds auch verwendet
Arguments
- $parentRow
Details
- visibility
- protected
- final
- true
- static
- false
delete
delete(
$parentRow
)
:
Arguments
- $parentRow
Details
- visibility
- public
- final
- false
- static
- false
formatValidationErrors
formatValidationErrors(
$errors
)
:
\string[]
Static helper function that formats form errors
Arguments
- $errors
Output
- \string[]
Details
- visibility
- public
- final
- false
- static
- true
getHideForValue
getHideForValue(
)
:
Details
- visibility
- public
- final
- false
- static
- false
getMetaData
getMetaData(
)
:
Details
- visibility
- public
- final
- false
- static
- false
getModel
getModel(
)
:
Details
- visibility
- public
- final
- false
- static
- false
getPrimaryKey
getPrimaryKey(
)
:
Details
- visibility
- public
- final
- false
- static
- false
getRow
getRow(
$parentRow
=
null
)
:
Arguments
- $parentRow
Details
- visibility
- public
- final
- false
- static
- false
hideForValue
hideForValue(
$field, $value, $hideField
)
:
Hide a field has a specific value, hide other fields
ATM only implemented in Frontend Form
Arguments
- $field
- $value
- $hideField
Details
- visibility
- public
- final
- false
- static
- false
prepareSave
prepareSave(
$parentRow, $postData
)
:
Arguments
- $parentRow
- $postData
Details
- visibility
- public
- final
- false
- static
- false
processInput
processInput(
$parentRow, $postData
=
array
)
:
Arguments
- $parentRow
- $postData
Details
- visibility
- public
- final
- false
- static
- false
save
save(
$parentRow, $postData
)
:
Arguments
- $parentRow
- $postData
Details
- visibility
- public
- final
- false
- static
- false
setModel
setModel(
$model
)
:
Arguments
- $model
Details
- visibility
- public
- final
- false
- static
- false