Show the track in a different way, ordered by round and group showing traffic light color indicating the status of a token and uses inline answer display.

Adds columns to the model and adds extra logic for calc_used_date sorting.

package Gems
subpackage Snippets
copyright Copyright (c) 2014 Erasmus MC
license New BSD License
since Class available since version 1.6.1
inherited_from \Gems_Snippets_RespondentTokenSnippet

 Methods

addToken()

addToken($tokenData) 

Parameters

$tokenData

afterRegistry()

afterRegistry() 

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

afterRegistry() : void
Inherited

createModel()

createModel() 

getHtmlOutput()

getHtmlOutput(\Zend_View_Abstract $view) 

Parameters

$view

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

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

hasHtmlOutput() 

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.

inherited_from \Gems_Snippets_RespondentTokenSnippet::hasHtmlOutput()

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

hasHtmlOutput() : boolean
Inherited

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

Initialize the view

_initView(\Zend_View $view) 

Make sure the needed javascript is loaded

Parameters

$view

\Zend_View

Copied from \Gems_Token, to save overhead of loading a token just for this check

_isCompleted(array $tokenData) : boolean

Parameters

$tokenData

array

Returns

boolean

Are we past the valid until date

_isMissed(array $tokenData) : boolean

Parameters

$tokenData

array

Returns

boolean

Adds columns from the model to the bridge that creates the browse table.

addBrowseTableColumns(\MUtil_Model_Bridge_TableBridge $bridge, \MUtil_Model_ModelAbstract $model) : void
Inherited

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

Parameters

$bridge

\MUtil_Model_Bridge_TableBridge

$model

\MUtil_Model_ModelAbstract

Add the paginator panel to the table.

addPaginator(\MUtil_Html_TableElement $table, \Zend_Paginator $paginator) 
Inherited

Only called when $this->browse is true. Overrule this function to define your own method.

$param \Zend_Paginator $paginator

Parameters

$table

$paginator

Make sure generic search text results are marked

applyTextMarker() : void
Inherited

Creates the model

createModel() : \MUtil_Model_ModelAbstract
Inherited

Returns

\MUtil_Model_ModelAbstract

Finds a specific active menu item

findMenuItem(string $defaultController, string|array $actions = 'index') : \Gems_Menu_SubMenuItem
Inherited
deprecated since 1.7.1, use findMenuItems()

Parameters

$defaultController

string

$actions

stringarray

Returns

\Gems_Menu_SubMenuItemThe first that

Finds a specific active menu item

findMenuItems(string $defaultController, string|array $actions = array('index')) : array
Inherited

Parameters

$defaultController

string

$actions

stringarray

Returns

arrayof \Gems_Menu_SubMenuItem

finishGroup()

finishGroup($progressDiv) 

Parameters

$progressDiv

finishTrack()

finishTrack($progressDiv) 

Parameters

$progressDiv

Returns an edit menu item, if access is allowed by privileges

getEditMenuItem() : \Gems_Menu_SubMenuItem
Inherited
deprecated since 1.7.1, use getEditMenuItems()

Returns

\Gems_Menu_SubMenuItem

Returns an edit menu item, if access is allowed by privileges

getEditMenuItems() : \Gems_Menu_SubMenuItem
Inherited

Returns

\Gems_Menu_SubMenuItem

Returns a show menu item, if access is allowed by privileges

getShowMenuItem() : \Gems_Menu_SubMenuItem
Inherited
deprecated since 1.7.1, use getShowMenuItems()

Returns

\Gems_Menu_SubMenuItem

Returns a show menu item, if access is allowed by privileges

getShowMenuItems() : \Gems_Menu_SubMenuItem
Inherited

Returns

\Gems_Menu_SubMenuItem

Overrule to implement snippet specific filtering and sorting.

processFilterAndSort(\MUtil_Model_ModelAbstract $model) 
Inherited

Parameters

$model

\MUtil_Model_ModelAbstract

calc_used_date has special sort, see bugs 108 and 127

sortCalcDateCheck(\MUtil_Model_ModelAbstract $model) 
Inherited

Parameters

$model

\MUtil_Model_ModelAbstract

 Properties

 

Sets pagination on or off.

$browse 

Default

false
inherited_from \Gems_Snippets_RespondentTokenSnippet::browse
 

Sets pagination on or off.

$browse : boolean

Default

true
 

$creator

$creator : \MUtil_Html_Creator

Default

null
 

Use keyboard to select row

$keyboard : boolean

Default

false
 

Make sure the keyboard id is used only once

$keyboardUsed : boolean

Default

false
Static
 

$menu

$menu : \Gems_Menu

Default

 

The default controller for menu actions, if null the current controller is used.

$menuActionController : array

Default

null
 

Menu actions to show in Edit box.

$menuEditActions : array

Default

array('edit')

If controller is numeric $menuActionController is used, otherwise the key specifies the controller.

 

Menu actions to show in Show box.

$menuShowActions : array

Default

array('show')

If controller is numeric $menuActionController is used, otherwise the key specifies the controller.

 

$_completed

$_completed 

Default

0
 

The display format for the date

$_dateFormat : string

Default

 

$_fixedFilter

$_fixedFilter 

Default

array()
 

Set a fixed model sort.

$_fixedSort 

Default

array('gr2t_start_date' => SORT_DESC, 'gto_id_respondent_track' => SORT_DESC, 'gto_round_order' => SORT_ASC, 'gto_valid_from' => SORT_ASC, 'gto_round_description' => SORT_ASC, 'forgroup' => SORT_ASC, 'gto_round_order' => SORT_ASC)

Leading _ means not overwritten by sources.

inherited_from \Gems_Snippets_RespondentTokenSnippet::_fixedSort
 

Set a fixed model sort.

$_fixedSort : array

Default

array('calc_used_date' => SORT_ASC, 'gtr_track_name' => SORT_ASC, 'gto_round_order' => SORT_ASC, 'gto_created' => SORT_ASC)

Leading _ means not overwritten by sources.

 

$_future

$_future 

Default

0
 

$_missed

$_missed 

Default

0
 

$_open

$_open 

Default

0
 

$_surveyAnswer

$_surveyAnswer : \Gems_Menu_SubMenuItem

Default

 

$_takeSurvey

$_takeSurvey : \Gems_Menu_SubMenuItem

Default

 

$_trackAnswer

$_trackAnswer : \Gems_Menu_SubMenuItem

Default

 

$_trackDelete

$_trackDelete : \Gems_Menu_SubMenuItem

Default

 

$_trackEdit

$_trackEdit : \Gems_Menu_SubMenuItem

Default

 

$_track_completed

$_track_completed 

Default

0
 

$_track_future

$_track_future 

Default

0
 

$_track_missed

$_track_missed 

Default

0
 

$_track_open

$_track_open 

Default

0
 

Shortfix to add class attribute

$class : string

Default

'browser table'
 

The id of a div that contains the table.

$containingId : string

Default

 

The default search data to use.

$defaultSearchData : \array()

Default

array()
 

When true: show tokens for all organisations, false: only current organisation, array => those organisations

$forOtherOrgs : mixed

Default

false
 

$loader

$loader : \Gems_Loader

Default

 

A model, not necessarily the token model

$model : \MUtil_Model_ModelAbstract

Default

 

Require

$request : \Zend_Controller_Request_Abstract

Default

 

Required

$respondent : \Gems_Tracker_Respondent

Default

 

Option to manually diasable the menu

$showMenu : boolean

Default

true
 

The $request param that stores the ascending sort

$sortParamAsc : string

Default

'asrt'
 

The $request param that stores the descending sort

$sortParamDesc : string

Default

'dsrt'