Function __global->notifications_enabled
Definitions
sources/notifications.php
- Find whether notifications are enabled for a member on a notification code+category. Does not check security (must go through notification object for that).
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: bool
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $notification_code | ID_TEXT | No | No | required parameter | N/A | N/A | The notification code to check |
| $notification_category | ?SHORT_TEXT | No | No | required parameter | N/A | N/A | The category within the notification code (null: none) |
| $member_id | ?MEMBER | No | No | Null | N/A | N/A | The member being de-signed up (null: current member) |
Returns
- Whether they are
- Type: boolean
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Find whether notifications are enabled for a member on a notification code+category. Does not check security (must go through notification object for that).
*
* @param ID_TEXT $notification_code The notification code to check
* @param ?SHORT_TEXT $notification_category The category within the notification code (null: none)
* @param ?MEMBER $member_id The member being de-signed up (null: current member)
* @return boolean Whether they are
*/
function notifications_enabled(string $notification_code, ?string $notification_category, ?int $member_id = null) : bool
* Find whether notifications are enabled for a member on a notification code+category. Does not check security (must go through notification object for that).
*
* @param ID_TEXT $notification_code The notification code to check
* @param ?SHORT_TEXT $notification_category The category within the notification code (null: none)
* @param ?MEMBER $member_id The member being de-signed up (null: current member)
* @return boolean Whether they are
*/
function notifications_enabled(string $notification_code, ?string $notification_category, ?int $member_id = null) : bool

