Display those questions that are answered with 'yes' op top

Questions names that are the same as the yes question but with a longer name separated by an '_' are moved with the question, as are header questions (which may be doubled when not all question come out on top).

package Gems
subpackage Events
copyright Copyright (c) 2012 Erasmus MC
license New BSD License
since Class available since version 1.5.6
inherited_from \Gems_Event_SurveyAnswerFilterAbstract

 Methods

This function is called in addBrowseTableColumns() to filter the names displayed by AnswerModelSnippetGeneric.

filterAnswers(\MUtil_Model_Bridge_TableBridge $bridge, \MUtil_Model_ModelAbstract $model, array $currentNames) : array
see

Parameters

$bridge

\MUtil_Model_Bridge_TableBridge

$model

\MUtil_Model_ModelAbstract

$currentNames

array

The current names in use (allows chaining)

Returns

arrayOf the names of labels that should be shown

Function that returns the snippets to use for this display.

getAnswerDisplaySnippets(\Gems_Tracker_Token $token) : array
Inherited
inherited_from \Gems_Event_SurveyDisplayEventInterface::getAnswerDisplaySnippets()

Parameters

$token

\Gems_Tracker_Token

The token to get the snippets for

Returns

arrayof Snippet names or nothing

A pretty name for use in dropdown selection boxes.

getEventName() : string

Returns

stringName

Returns only the headers

getHeaders(\MUtil_Model_ModelAbstract $model, array $currentNames) : array
Inherited

Parameters

$model

\MUtil_Model_ModelAbstract

$currentNames

array

The current names in use (allows chaining)

Returns

arrayOf the names of labels that should be shown

Restores the header position of question before their corresponding question_sub

restoreHeaderPositions(\MUtil_Model_ModelAbstract $model, array $currentNames) : array
Inherited

When sub-questions with the same parent are shown continuous the parent is shown once before them. When the sub-questions are displayed in seperate groups the parent is shown once at their start.

Stand alone headers without any corresponding value are removed. When they do have a value of their own they are still shown, but their position may change according to their sub-questions position. (NOTE: As in LimeSurvey their are no question headers with values we leave it at this for the moment.)

Parameters

$model

\MUtil_Model_ModelAbstract

$currentNames

array

The current names in use (allows chaining)

Returns

arrayOf the names of labels that should be shown

 Properties

 

$locale

$locale : \Zend_Locale

Default

 

$token

$token : \Gems_Tracker_Token

Default