Adds basic track editing snippet parameter processing and checking.

This class supplies the model and adjusts the basic load & save functions.

package Gems
subpackage Tracker
copyright Copyright (c) 2011 Erasmus MC
license New BSD License
since Class available since version 1.4
inherited_from \Gems_Snippets_ModelFormSnippetAbstract

 Methods

Called after the check that all required registry values have been set correctly has run.

afterRegistry() : void
Inherited

Perform some actions on the form, right before it is displayed but already populated

beforeDisplay() : \Zend_Form
Inherited

Here we add the table display to the form.

Returns

\Zend_Form

Should be called after answering the request to allow the Target to check if all required registry values have been set correctly.

checkRegistryRequestsAnswers() : boolean
inherited_from \Gems_Snippets_ModelFormSnippetAbstract::checkRegistryRequestsAnswers()

Returns

booleanFalse if required are missing.

Should be called after answering the request to allow the Target to check if all required registry values have been set correctly.

checkRegistryRequestsAnswers() : boolean
Inherited

Returns

booleanFalse if required are missing.

Create the snippets content

getHtmlOutput(\Zend_View_Abstract $view) : \MUtil_Html_HtmlInterface
Inherited

This is a stub function either override getHtmlOutput() or override render()

Parameters

$view

\Zend_View_Abstract

Just in case it is needed here

Returns

\MUtil_Html_HtmlInterfaceSomething that can be rendered

Helper function to allow generalized statements about the items in the model to used specific item names.

getTopic(integer $count = 1) : \$string
inherited_from \Gems_Snippets_ModelFormSnippetAbstract::getTopic()

Parameters

$count

integer

Returns

\$string

Helper function to allow generalized statements about the items in the model to used specific item names.

getTopic(integer $count = 1) : \$string
Inherited

Parameters

$count

integer

Returns

\$string

The place to check if the data set in the snippet is valid to generate the snippet.

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.

Returns

boolean

Adds elements from the model to the bridge that creates the form.

addFormElements(\MUtil_Model_Bridge_FormBridgeInterface $bridge, \MUtil_Model_ModelAbstract $model) 
Inherited

Overrule this function to add different elements to the browse table, without having to recode the core table building code.

Parameters

$bridge

\MUtil_Model_Bridge_FormBridgeInterface

$model

\MUtil_Model_ModelAbstract

Simple default function for making sure there is a $this->_saveButton.

addSaveButton() 
Inherited

As the save button is not part of the model - but of the interface - it does deserve it's own function.

Hook that allows actions when data was saved

afterSave(integer $changed) 
Inherited

When not rerouted, the form will be populated afterwards

Parameters

$changed

integer

The number of changed rows (0 or 1 usually, but can be more)

Creates an empty form. Allows overruling in sub-classes.

createForm(mixed $options = null) : \Zend_Form
Inherited

Parameters

$options

mixed

Returns

\Zend_Form

Creates the model

createModel() : \MUtil_Model_ModelAbstract

Returns

\MUtil_Model_ModelAbstract

overrule to add your own buttons.

getMenuList() : \Gems_Menu_MenuList
Inherited

Returns

\Gems_Menu_MenuList

Retrieve the header title to display

getTitle() : string
inherited_from \Gems_Snippets_ModelFormSnippetAbstract::getTitle()

Returns

stringThe header title to display

Retrieve the header title to display

getTitle() : string
Inherited

Returns

string

Hook that loads the form data from $_POST or the model

loadFormData() 

Or from whatever other source you specify here.

If menu item does not exist or is not allowed, redirect to index

setAfterSaveRoute() : \Gems_Snippets_ModelFormSnippetAbstract
inherited_from \Gems_Snippets_ModelFormSnippetAbstract::setAfterSaveRoute()

Returns

\Gems_Snippets_ModelFormSnippetAbstract

If menu item does not exist or is not allowed, redirect to index

setAfterSaveRoute() : \Gems_Snippets_ModelFormSnippetAbstract
Inherited

Returns

\Gems_Snippets_ModelFormSnippetAbstract

 Properties

 

$accesslog

$accesslog : \Gems_AccessLog

Default

 

Shortfix to add class attribute

$class : string

Default

'formTable'
 

An optional title for the form. replacing the current generic form title.

$formTitle : string

Default

 

Required

$loader : \Gems_Loader

Default

 

Required

$menu : \Gems_Menu

Default

 

$menuShowChildren

$menuShowChildren : boolean

Default

false
 

$menuShowSiblings

$menuShowSiblings : boolean

Default

false
 

Optional, required when creating

$organizationId : integer

Default

 

Optional, required when creating

$patientId : string

Default

 

$project

$project : \Gems_Project_ProjectSettings

Default

 

Required

$request : \Zend_Controller_Request_Abstract

Default

 

The respondent

$respondent : \Gems_Tracker_Respondent

Default

 

Optional, required when editing or $respondentTrackId should be set

$respondentTrack : \Gems_Tracker_RespondentTrack

Default

 

Optional, required when editing or $respondentTrack should be set

$respondentTrackId : integer

Default

 

The name of the action to forward to after form completion

$routeAction : string

Default

'show-track'
inherited_from \Gems_Snippets_ModelFormSnippetAbstract::routeAction
 

The name of the action to forward to after form completion

$routeAction : string

Default

'show'
 

When set getTopic uses this function instead of parent class.

$topicCallable : callable

Default

 

Optional, required when creating or $trackId should be set

$trackEngine : \Gems_Tracker_Engine_TrackEngineInterface

Default

 

Optional, required when creating or $engine should be set

$trackId : integer

Default

 

When true a tabbed form is used.

$useTabbedForm : boolean

Default

false
 

Optional, required when creating or loader should be set

$userId : integer

Default

 

$util

$util : \Gems_Util

Default