Function Module_admin_leader_board->get_form_fields
Definitions
adminzone/pages/modules/admin_leader_board.php
- Get Tempcode for adding/editing form.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $id | ?AUTO_LINK | No | No | Null | N/A | N/A | The ID of the leader-board (null: not added yet) |
| $title | SHORT_TEXT | No | No | Blank (empty string) | N/A | N/A | A title for this leader-board |
| $board_type | SHORT_TEXT | No | No | holders | holders earners | N/A | The type of leader-board |
| $member_count | integer | No | No | 10 | N/A | N/A | The size of the leader-board |
| $timeframe | SHORT_TEXT | No | No | week | week month year | N/A | The frequency of this leader-board |
| $rolling | BINARY | No | No | 0 | N/A | N/A | Whether or not this leader-board generation time is rolling |
| $include_staff | BINARY | No | No | 0 | N/A | N/A | Whether to include staff in the leader-board |
| $usergroups | array | No | No | [] | N/A | N/A | Only allow members in one or more defined usergroup IDs to be included in the leader-board (empty: allow all usergroups) |
| $calculate_voting_power | BINARY | No | No | 0 | N/A | N/A | Whether this leader-board should calculate voting powers and control percentages and also display those |
Returns
- A pair: The input fields, Hidden fields
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get Tempcode for adding/editing form.
*
* @param ?AUTO_LINK $id The ID of the leader-board (null: not added yet)
* @param SHORT_TEXT $title A title for this leader-board
* @param SHORT_TEXT $board_type The type of leader-board
* @set holders earners
* @param integer $member_count The size of the leader-board
* @param SHORT_TEXT $timeframe The frequency of this leader-board
* @set week month year
* @param BINARY $rolling Whether or not this leader-board generation time is rolling
* @param BINARY $include_staff Whether to include staff in the leader-board
* @param array $usergroups Only allow members in one or more defined usergroup IDs to be included in the leader-board (empty: allow all usergroups)
* @param BINARY $calculate_voting_power Whether this leader-board should calculate voting powers and control percentages and also display those
* @return array A pair: The input fields, Hidden fields
*/
public function get_form_fields(?int $id = null, string $title = '', string $board_type = 'holders', int $member_count = 10, string $timeframe = 'week', int $rolling = 0, int $include_staff = 0, array $usergroups = [], int $calculate_voting_power = 0) : array
* Get Tempcode for adding/editing form.
*
* @param ?AUTO_LINK $id The ID of the leader-board (null: not added yet)
* @param SHORT_TEXT $title A title for this leader-board
* @param SHORT_TEXT $board_type The type of leader-board
* @set holders earners
* @param integer $member_count The size of the leader-board
* @param SHORT_TEXT $timeframe The frequency of this leader-board
* @set week month year
* @param BINARY $rolling Whether or not this leader-board generation time is rolling
* @param BINARY $include_staff Whether to include staff in the leader-board
* @param array $usergroups Only allow members in one or more defined usergroup IDs to be included in the leader-board (empty: allow all usergroups)
* @param BINARY $calculate_voting_power Whether this leader-board should calculate voting powers and control percentages and also display those
* @return array A pair: The input fields, Hidden fields
*/
public function get_form_fields(?int $id = null, string $title = '', string $board_type = 'holders', int $member_count = 10, string $timeframe = 'week', int $rolling = 0, int $include_staff = 0, array $usergroups = [], int $calculate_voting_power = 0) : array

