Function Hook_cns_warnings_point_transactions->actualise_punitive_action
Definitions
sources/hooks/systems/cns_warnings/point_transactions.php
- Actualise punitive actions.Note that this assumes action was applied through the warnings form, and that post parameters still exist.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| &$punitive_messages | array | Yes | No | required parameter | N/A | N/A | Punitive action text to potentially be included in the PT automatically (passed by reference) |
| $warning_id | AUTO_LINK | No | No | required parameter | N/A | N/A | The ID of the warning that was created for this punitive action |
| $member_id | MEMBER | No | No | required parameter | N/A | N/A | The member this warning is being applied to |
| $username | SHORT_TEXT | No | No | required parameter | N/A | N/A | The username of the member this warning is being applied to |
| $explanation | SHORT_TEXT | No | No | required parameter | N/A | N/A | The defined explanation for this warning |
| &$message | LONG_TEXT | Yes | No | required parameter | N/A | N/A | The message to be sent as a PT (passed by reference; you should generally use $punitive_text instead if you want to add PT text) |
Preview
Code (PHP)
/**
* Actualise punitive actions.Note that this assumes action was applied through the warnings form, and that post parameters still exist.
*
* @param array $punitive_messages Punitive action text to potentially be included in the PT automatically (passed by reference)
* @param AUTO_LINK $warning_id The ID of the warning that was created for this punitive action
* @param MEMBER $member_id The member this warning is being applied to
* @param SHORT_TEXT $username The username of the member this warning is being applied to
* @param SHORT_TEXT $explanation The defined explanation for this warning
* @param LONG_TEXT $message The message to be sent as a PT (passed by reference; you should generally use $punitive_text instead if you want to add PT text)
*/
public function actualise_punitive_action(array &$punitive_messages, int $warning_id, int $member_id, string $username, string $explanation, string &$message)
* Actualise punitive actions.Note that this assumes action was applied through the warnings form, and that post parameters still exist.
*
* @param array $punitive_messages Punitive action text to potentially be included in the PT automatically (passed by reference)
* @param AUTO_LINK $warning_id The ID of the warning that was created for this punitive action
* @param MEMBER $member_id The member this warning is being applied to
* @param SHORT_TEXT $username The username of the member this warning is being applied to
* @param SHORT_TEXT $explanation The defined explanation for this warning
* @param LONG_TEXT $message The message to be sent as a PT (passed by reference; you should generally use $punitive_text instead if you want to add PT text)
*/
public function actualise_punitive_action(array &$punitive_messages, int $warning_id, int $member_id, string $username, string $explanation, string &$message)

