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
stringThe name of the values
mixedThe value to compare to
arrayThe results to add to
arrayThe answers to compare to
booleanTrue when the value changed.averageInt(array $tokenAnswers, mixed $fieldNames) : float
arrayArray containing the answers
mixedAn array of those names that should be used or a string that should occur in all names that have to be selected.
floatcheckFloatChanged(array $values, array $tokenAnswers) : array
array
array
arrayThose values that were changed.checkIntegerChanged(array $values, array $tokenAnswers) : array
array
array
arrayThose values that were changed.getEventName() : string
stringNameprocessTokenData(\Gems_Tracker_Token $token) : array
Storing the changed values is handled by the calling function.
| inherited_from | \Gems_Event_SurveyCompletedEventInterface::processTokenData() |
|---|
\Gems_Tracker_TokenGems token object
arrayContaining 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
integerroundFixed(\numeric $value, integer $decimals = 2) : string
\numeric
integer
stringsumInt(array $tokenAnswers, mixed $fieldNames) : integer
arrayArray containing the answers
mixedAn 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