Displays the variables and their values to help create a new calculation
To start a new calculation you need to know the exact name of the variables returned by the survey source. This event will show this information and the values for each token it finds.
package | Gems |
---|---|
subpackage | Events |
copyright | Copyright (c) 2011 Erasmus MC |
license | New BSD License |
since | Class available since version 1.5.1 |
inherited_from | \Gems_Event_EventCalculations |
addWhenChanged(string $name, mixed $value, array $results, array $tokenAnswers) : boolean
string
The name of the values
mixed
The value to compare to
array
The results to add to
array
The answers to compare to
boolean
True when the value changed.averageInt(array $tokenAnswers, mixed $fieldNames) : float
array
Array containing the answers
mixed
An array of those names that should be used or a string that should occur in all names that have to be selected.
float
checkFloatChanged(array $values, array $tokenAnswers) : array
array
array
array
Those values that were changed.checkIntegerChanged(array $values, array $tokenAnswers) : array
array
array
array
Those values that were changed.getEventName() : string
string
NameprocessTokenData(\Gems_Tracker_Token $token) : array
Storing the changed values is handled by the calling function.
inherited_from | \Gems_Event_SurveyCompletedEventInterface::processTokenData() |
---|
\Gems_Tracker_Token
Gems token object
array
Containing the changed valuesreverseCode(integer $code, integer $min, integer $max) : integer
Used when a code can have the values 1 to 5 or 0 to 9 and the reverse outcome should be used, e.g.: 5 = 1, 4 = 2, 3 = 3, 2 = 4, 1 = 5.
integer
integer
integer
integer
roundFixed(\numeric $value, integer $decimals = 2
) : string
\numeric
integer
string
sumInt(array $tokenAnswers, mixed $fieldNames) : integer
array
Array containing the answers
mixed
An array of those names that should be used or a string that should occur in all names that have to be selected.
integer
_arrayFindName(array $tokenAnswers, string $fieldNames) : array
array
string
array