Displays an edit form based on the model the model set through the $model snippet parameter.
This class is not in the standard snippet loading directories and does not follow their naming conventions, but exists only to make it simple to extend this class for a specific implementation.
package | Gems |
---|---|
subpackage | ItemSnippets |
copyright | Copyright (c) 2014 Erasmus MC |
license | New BSD License |
since | Class available since version 1.6.5 24-sep-2014 17:41:20 |
inherited_from | \Gems_Snippets_ModelFormSnippetGeneric |
afterRegistry() : void
beforeDisplay() : \Zend_Form
Here we add the table display to the form.
\Zend_Form
checkRegistryRequestsAnswers() : boolean
boolean
False if required are missing.getHtmlOutput(\Zend_View_Abstract $view) : \MUtil_Html_HtmlInterface
This is a stub function either override getHtmlOutput() or override render()
\Zend_View_Abstract
Just in case it is needed here
\MUtil_Html_HtmlInterface
Something that can be renderedgetTopic(integer $count = 1
) : \$string
integer
\$string
hasHtmlOutput() : boolean
When invalid data should result in an error, you can throw it here but you can also perform the check in the checkRegistryRequestsAnswers() function from the \MUtil_Registry_TargetInterface.
boolean
loadStaffRespondent(mixed $value, boolean $isNew= false
, string $name= null
, array $context= array()
, boolean $isPost= false
) : \MUtil_Date | \Zend_Db_Expr | string
If empty or \Zend_Db_Expression (after save) it will return just the value currently there are no checks for a valid date format.
see |
---|
mixed
The value being saved
boolean
True when a new item is being saved
string
The name of the current field
array
Optional, the other values being saved
boolean
True when passing on post data
\MUtil_Date
\Zend_Db_Expr
string
saveIsRespondent(mixed $value, boolean $isNew= false
, string $name= null
, array $context= array()
) : \Zend_Date
saveIsStaff(mixed $value, boolean $isNew= false
, string $name= null
, array $context= array()
) : \Zend_Date
addFormElements(\MUtil_Model_Bridge_FormBridgeInterface $bridge, \MUtil_Model_ModelAbstract $model)
Overrule this function to add different elements to the browse table, without having to recode the core table building code.
\MUtil_Model_Bridge_FormBridgeInterface
\MUtil_Model_ModelAbstract
addSaveButton()
As the save button is not part of the model - but of the interface - it does deserve it's own function.
afterSave(integer $changed)
When not rerouted, the form will be populated afterwards
integer
The number of changed rows (0 or 1 usually, but can be more)
createForm(mixed $options = null
) : \Zend_Form
mixed
\Zend_Form
createModel() : \MUtil_Model_ModelAbstract
inherited_from | \Gems_Snippets_ModelFormSnippetGeneric::createModel() |
---|
\MUtil_Model_ModelAbstract
createModel() : \MUtil_Model_ModelAbstract
\MUtil_Model_ModelAbstract
getMenuList() : \Gems_Menu_MenuList
\Gems_Menu_MenuList
getTitle() : string
string
loadFormData()
Or from whatever other source you specify here.
setAfterSaveRoute() : \Gems_Snippets_ModelFormSnippetAbstract
\Gems_Snippets_ModelFormSnippetAbstract
$accesslog : \Gems_AccessLog
$class : string
'formTable'
$currentUser : \Gems_User_User
$formTitle : string
$model : \MUtil_Model_ModelAbstract
inherited_from | \Gems_Snippets_ModelFormSnippetGeneric::model |
---|
$model : \MUtil_Model_ModelAbstract
$project : \Gems_Project_ProjectSettings
$routeAction : string
'show'
$topicCallable : callable
$useTabbedForm : boolean
false