Function Module_warnings->get_form_fields
Definitions
site/pages/modules/warnings.php
- Get Tempcode for a warning 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 |
|---|---|---|---|---|---|---|---|
| $new | boolean | No | No | True | N/A | N/A | Whether it is a new warning/punishment record |
| $explanation | LONG_TEXT | No | No | Blank (empty string) | N/A | N/A | The explanation for the warning/punishment record |
| $is_warning | BINARY | No | No | 1 | N/A | N/A | Whether to make this a formal warning |
| $member_id | ?MEMBER | No | No | Null | N/A | N/A | The member the warning is for (null: get from environment) |
Returns
- A pair: The input fields, Hidden fields
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get Tempcode for a warning adding/editing form.
*
* @param boolean $new Whether it is a new warning/punishment record
* @param LONG_TEXT $explanation The explanation for the warning/punishment record
* @param BINARY $is_warning Whether to make this a formal warning
* @param ?MEMBER $member_id The member the warning is for (null: get from environment)
* @return array A pair: The input fields, Hidden fields
*/
public function get_form_fields(bool $new = true, string $explanation = '', int $is_warning = 1, ?int $member_id = null) : array
* Get Tempcode for a warning adding/editing form.
*
* @param boolean $new Whether it is a new warning/punishment record
* @param LONG_TEXT $explanation The explanation for the warning/punishment record
* @param BINARY $is_warning Whether to make this a formal warning
* @param ?MEMBER $member_id The member the warning is for (null: get from environment)
* @return array A pair: The input fields, Hidden fields
*/
public function get_form_fields(bool $new = true, string $explanation = '', int $is_warning = 1, ?int $member_id = null) : array

