Function __global->cns_calculate_poll_voting_power_text
Definitions
sources/cns_polls_action2.php
- Calculate how much voting power a certain amount of points has and return text versions of the calculations.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $points | integer | No | No | required parameter | N/A | N/A | The number of points from which to calculate the voting power |
| $overrides | array | No | No | [] | N/A | N/A | Array of option overrides (empty: no overrides) |
Returns
- Tuple; first item is a Tempcode of the equation itself, second item is a Tempcode with the numbers substituted into the equation, and third item is the final result
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Calculate how much voting power a certain amount of points has and return text versions of the calculations.
*
* @param integer $points The number of points from which to calculate the voting power
* @param array $overrides Array of option overrides (empty: no overrides)
* @return array Tuple; first item is a Tempcode of the equation itself, second item is a Tempcode with the numbers substituted into the equation, and third item is the final result
*/
function cns_calculate_poll_voting_power_text(int $points, array $overrides = []) : array
* Calculate how much voting power a certain amount of points has and return text versions of the calculations.
*
* @param integer $points The number of points from which to calculate the voting power
* @param array $overrides Array of option overrides (empty: no overrides)
* @return array Tuple; first item is a Tempcode of the equation itself, second item is a Tempcode with the numbers substituted into the equation, and third item is the final result
*/
function cns_calculate_poll_voting_power_text(int $points, array $overrides = []) : array

