Function __global->take_param_int_modeavg
Definitions
sources/form_templates.php
- Find a default property, defaulting to the average of what is there already, or the given default if really necessary.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: int
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $setting | ?integer | No | No | required parameter | N/A | N/A | The current setting (null: we have to work it out); if non-null, the function will immediately return |
| $db_property | ID_TEXT | No | No | required parameter | N/A | N/A | The property |
| $table | ID_TEXT | No | No | required parameter | N/A | N/A | The table to average within |
| $default | integer | No | No | required parameter | N/A | N/A | The last-resort default |
Returns
- The value
- Type: integer
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Find a default property, defaulting to the average of what is there already, or the given default if really necessary.
*
* @param ?integer $setting The current setting (null: we have to work it out); if non-null, the function will immediately return
* @param ID_TEXT $db_property The property
* @param ID_TEXT $table The table to average within
* @param integer $default The last-resort default
* @return integer The value
*/
function take_param_int_modeavg(?int $setting, string $db_property, string $table, int $default) : int
* Find a default property, defaulting to the average of what is there already, or the given default if really necessary.
*
* @param ?integer $setting The current setting (null: we have to work it out); if non-null, the function will immediately return
* @param ID_TEXT $db_property The property
* @param ID_TEXT $table The table to average within
* @param integer $default The last-resort default
* @return integer The value
*/
function take_param_int_modeavg(?int $setting, string $db_property, string $table, int $default) : int

