Function Hook_notification_cns->member_could_potentially_enable
Definitions
sources/hooks/systems/notifications/cns.php
- Find whether a member could enable this notification (i.e. have permission to).
- 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 | Notification code |
| $member_id | MEMBER | No | No | required parameter | N/A | N/A | Member to check against |
| $category | ?SHORT_TEXT | No | No | Null | N/A | N/A | The category within the notification code (null: none) |
Returns
- Whether they could
- Type: boolean
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Find whether a member could enable this notification (i.e. have permission to).
*
* @param ID_TEXT $notification_code Notification code
* @param MEMBER $member_id Member to check against
* @param ?SHORT_TEXT $category The category within the notification code (null: none)
* @return boolean Whether they could
*/
public function member_could_potentially_enable(string $notification_code, int $member_id, ?string $category = null) : bool
* Find whether a member could enable this notification (i.e. have permission to).
*
* @param ID_TEXT $notification_code Notification code
* @param MEMBER $member_id Member to check against
* @param ?SHORT_TEXT $category The category within the notification code (null: none)
* @return boolean Whether they could
*/
public function member_could_potentially_enable(string $notification_code, int $member_id, ?string $category = null) : bool

