The RespondentTrackModel is the model used to display and edit respondent tracks in snippets.
The main additions to a standard JoinModel are for filling in the respondent and track info while creating new tracks and key fiddling code for the different use cases.
The respondent track model combines all possible information about the respondents track from the tables:
package | Gems |
---|---|
subpackage | Tracker_Model |
copyright | Copyright (c) 2011 Erasmus MC |
license | New BSD License |
since | Class available since version 1.4 |
inherited_from | \Gems_Model_HiddenOrganizationModel |
_(string $text, string|\Zend_Locale $locale = null
) : string
Translates the given string returns the translation
string
Translation string
string
\Zend_Locale
(optional) Locale/Language to use, identical with locale identifier, @see \Zend_Locale for more information
string
__construct(string $name = 'surveys'
)
string
Optional different name for model
__construct(string $name, string $startTable, string $fieldPrefix= null
, mixed $saveable= null
)
string
A name for the model
string
The base table for the model
string
Prefix to use for change fields (date/userid), if $saveable empty sets it to true
mixed
Will changes to this table be saved, true or a combination of SAVE_MODE constants
addEditTracking() : \Gems_Tracker_Model_StandardTokenModel
\Gems_Tracker_Model_StandardTokenModel
addLeftTable(mixed $table, array $joinFields, string $fieldPrefix= null
, mixed $saveable= null
) : \Gems_Model_JoinModel
mixed
The name of the table to join or a table object or an array(corr_name => tablename) or array(int => tablename, corr_name)
array
Array of source->dest primary keys for this join
string
Prefix to use for change fields (date/userid), if $saveable empty sets it to true
mixed
Will changes to this table be saved, true or a combination of SAVE_MODE constants
\Gems_Model_JoinModel
addRightTable(mixed $table, array $joinFields, string $fieldPrefix= null
, mixed $saveable= null
) : \Gems_Model_JoinModel
mixed
The name of the table to join or a table object or an array(corr_name => tablename) or array(int => tablename, corr_name)
array
Array of source->dest primary keys for this join
string
Prefix to use for change fields (date/userid), if $saveable empty sets it to true
mixed
Will changes to this table be saved, true or a combination of SAVE_MODE constants
\Gems_Model_JoinModel
addTable(mixed $table, array $joinFields, string $fieldPrefix= null
, mixed $saveable= null
) : \Gems_Model_JoinModel
mixed
The name of the table to join or a table object or an array(corr_name => tablename) or array(int => tablename, corr_name)
array
Array of source->dest primary keys for this join
string
Prefix to use for change fields (date/userid), if $saveable empty sets it to true
mixed
Will changes to this table be saved, true or a combination of SAVE_MODE constants
\Gems_Model_JoinModel
afterRegistry() : void
This function is no needed if the classes are setup correctly
applyBrowseSettings() : \Gems_Model_RespondentTrackModel
\Gems_Model_RespondentTrackModel
applyDetailSettings(\Gems_Tracker_Engine_TrackEngineInterface $trackEngine, boolean $edit = false
) : \Gems_Model_RespondentTrackModel
\Gems_Tracker_Engine_TrackEngineInterface
boolean
When true the fields are added in edit mode
\Gems_Model_RespondentTrackModel
applyEditSettings(\Gems_Tracker_Engine_TrackEngineInterface $trackEngine) : \Gems_Model_RespondentTrackModel
\Gems_Tracker_Engine_TrackEngineInterface
\Gems_Model_RespondentTrackModel
applyParameters(array $parameters, boolean $includeNumericFilters = false
) : array
inherited_from | \Gems_Model_HiddenOrganizationModel::applyParameters() |
---|
array
boolean
When true numeric filter keys (0, 1, 2...) are added to the filter as well
array
The $parameters minus the sort & textsearch keysapplyParameters(array $parameters, boolean $includeNumericFilters = false
) : array
array
boolean
When true numeric filter keys (0, 1, 2...) are added to the filter as well
array
The $parameters minus the sort & textsearch keyscheckRegistryRequestsAnswers() : boolean
boolean
False if required are missing.getCurrentOrganization() : integer
integer
getKeyRef(mixed $forData, array $href= array()
, $organizationInKey= null
) : array
basically transforms the fieldnames ointo oan IDn => value array
mixed
Array value to vilter on
array
Or \ArrayObject
array
That can by used as hrefloadNew(integer $count= null
, array $filter= null
) : array
When $filter contains the keys gr2o_patient_nr and gr2o_id_organization the corresponding respondent information is loaded into the new item.
When $filter contains the key gtr_id_track the corresponding track information is loaded.
The $filter values are also propagated to the corresponding key values in the new item.
integer
When null a single new item is return, otherwise a nested array with $count new items
array
Allowed key values: gr2o_patient_nr, gr2o_id_organization and gtr_id_track
array
Nested when $count is not null, otherwise just a simple arrayplural(string $singular, string $plural, integer $number, string|\Zend_Locale $locale = null
) : string
Translates the given string using plural notations Returns the translated string
see |
---|
string
Singular translation string
string
Plural translation string
integer
Number for detecting the correct plural
string
\Zend_Locale
(Optional) Locale/Language to use, identical with locale identifier, @see \Zend_Locale for more information
string
save(array $newValues, array $filter = null
) : array
array
The values to store for a single model item.
array
If the filter contains old key values these are used to decide on update versus insert.
array
The values as they are after saving (they may change).setTableSaveable(string $table_name, string $fieldPrefix= null
, mixed $saveable= null
) : \Gems_Model_JoinModel
string
Does not test for existence
string
Prefix to use for change fields (date/userid), if $saveable empty sets it to true
mixed
Will changes to this table be saved, true or a combination of SAVE_MODE constants
\Gems_Model_JoinModel
_checkSaveable(mixed $saveable, string $fieldPrefix) : mixed
mixed
Will changes to this table be saved, true or a combination of SAVE_MODE constants
string
Prefix to use for change fields (date/userid), if $saveable empty sets it to true
mixed
The saveable setting to usegetTranslateAdapter() : \Zend_Translate_Adapter
\Zend_Translate_Adapter
initTranslateable()
This function is not needed if the variables have been defined correctly in the source for this object and theose variables have been applied.
return @void
$currentUser : \Gems_User_User
$translate : \Zend_Translate
$translateAdapter : \Zend_Translate_Adapter
$util : \Gems_Util