Function __global->points_transactions_reverse_all
Definitions
sources/points2.php
- Fully reverse all points transactions matching the provided criteria.You must provide at least one criteria to prevent accidental reversal of the entire ledger.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $send_notifications | ?boolean | No | No | False | N/A | N/A | Whether to send notifications for these transaction reversals (false: only the staff get it) (true: both the member and staff get it) (null: neither the member nor staff get it) |
| $sending_member | ?MEMBER | No | No | Null | N/A | N/A | Filter by member who sent the points (null: do not filter) |
| $receiving_member | ?MEMBER | No | No | Null | N/A | N/A | Filter by member who received the points (null: do not filter) |
| $t_type | ID_TEXT | No | No | Blank (empty string) | N/A | N/A | Filter by content type (blank: do not filter) |
| $t_subtype | ID_TEXT | No | No | Blank (empty string) | N/A | N/A | Filter by subtype / action (blank: do not filter) |
| $t_type_id | ID_TEXT | No | No | Blank (empty string) | N/A | N/A | Filter by content ID (blank: do not filter) |
Returns
- An array of duples containing the ID of the original transaction, and null if the transaction could not be reversed or an array tuple of ID of the new transaction reversing, a boolean whether an escrow was also cancelled during the reversal, and an array of additional point transactions that were reversed because they had a reverse_link to this one
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Fully reverse all points transactions matching the provided criteria.You must provide at least one criteria to prevent accidental reversal of the entire ledger.
*
* @param ?boolean $send_notifications Whether to send notifications for these transaction reversals (false: only the staff get it) (true: both the member and staff get it) (null: neither the member nor staff get it)
* @param ?MEMBER $sending_member Filter by member who sent the points (null: do not filter)
* @param ?MEMBER $receiving_member Filter by member who received the points (null: do not filter)
* @param ID_TEXT $t_type Filter by content type (blank: do not filter)
* @param ID_TEXT $t_subtype Filter by subtype / action (blank: do not filter)
* @param ID_TEXT $t_type_id Filter by content ID (blank: do not filter)
* @return array An array of duples containing the ID of the original transaction, and null if the transaction could not be reversed or an array tuple of ID of the new transaction reversing, a boolean whether an escrow was also cancelled during the reversal, and an array of additional point transactions that were reversed because they had a reverse_link to this one
*/
function points_transactions_reverse_all(?bool $send_notifications = false, ?int $sending_member = null, ?int $receiving_member = null, string $t_type = '', string $t_subtype = '', string $t_type_id = '') : array
* Fully reverse all points transactions matching the provided criteria.You must provide at least one criteria to prevent accidental reversal of the entire ledger.
*
* @param ?boolean $send_notifications Whether to send notifications for these transaction reversals (false: only the staff get it) (true: both the member and staff get it) (null: neither the member nor staff get it)
* @param ?MEMBER $sending_member Filter by member who sent the points (null: do not filter)
* @param ?MEMBER $receiving_member Filter by member who received the points (null: do not filter)
* @param ID_TEXT $t_type Filter by content type (blank: do not filter)
* @param ID_TEXT $t_subtype Filter by subtype / action (blank: do not filter)
* @param ID_TEXT $t_type_id Filter by content ID (blank: do not filter)
* @return array An array of duples containing the ID of the original transaction, and null if the transaction could not be reversed or an array tuple of ID of the new transaction reversing, a boolean whether an escrow was also cancelled during the reversal, and an array of additional point transactions that were reversed because they had a reverse_link to this one
*/
function points_transactions_reverse_all(?bool $send_notifications = false, ?int $sending_member = null, ?int $receiving_member = null, string $t_type = '', string $t_subtype = '', string $t_type_id = '') : array

