Derived abstract base class of notification hooks that provides only staff access.
| package | core_notifications |
|---|---|
| inherited_from | \Hook_Notification |
allowed_settings(\ID_TEXT $notification_code) : integer
\ID_TEXTNotification code
integerAllowed settingscreate_category_tree(\ID_TEXT $notification_code, \?ID_TEXT $id) : array
\ID_TEXTNotification code
\?ID_TEXTThe ID of where we're looking under (null: N/A)
arrayTree structureget_default_auto_setting(\ID_TEXT $notification_code, \?SHORT_TEXT $category = null) : integer
\ID_TEXTNotification code
\?SHORT_TEXTThe category within the notification code (null: none)
integerAutomatic settingget_initial_setting(\ID_TEXT $notification_code, \?SHORT_TEXT $category = null) : integer
\ID_TEXTNotification code
\?SHORT_TEXTThe category within the notification code (null: none)
integerInitial settinglist_handled_codes() : array
(Addons can define hooks that handle whole sets of codes, so hooks are written so they can take wide authority)
| inherited_from | \Hook_Notification::list_handled_codes() |
|---|
arrayList of codes (mapping between code names, and a pair: section and labelling for those codes)list_handled_codes() : array
(Addons can define hooks that handle whole sets of codes, so hooks are written so they can take wide authority)
arrayList of codes (mapping between code names, and a pair: section and labelling for those codes)list_members_who_have_enabled(\ID_TEXT $notification_code, \?SHORT_TEXT $category= null, \?array $to_member_ids= null, integer $start= 0, integer $max= 300) : array
| inherited_from | \Hook_Notification::list_members_who_have_enabled() |
|---|
\ID_TEXTNotification code
\?SHORT_TEXTThe category within the notification code (null: none)
\?arrayList of member IDs we are restricting to (null: no restriction). This effectively works as a intersection set operator against those who have enabled.
integerStart position (for pagination)
integerMaximum (for pagination)
arrayA pair: Map of members to their notification setting, and whether there may be morelist_members_who_have_enabled(\ID_TEXT $notification_code, \?SHORT_TEXT $category= null, \?array $to_member_ids= null, integer $start= 0, integer $max= 300) : array
\ID_TEXTNotification code
\?SHORT_TEXTThe category within the notification code (null: none)
\?arrayList of member IDs we are restricting to (null: no restriction). This effectively works as a intersection set operator against those who have enabled.
integerStart position (for pagination)
integerMaximum (for pagination)
arrayA pair: Map of members to their notification setting, and whether there may be moremember_could_potentially_enable(\ID_TEXT $notification_code, \MEMBER $member_id, \?SHORT_TEXT $category = null) : boolean
| inherited_from | \Hook_Notification::member_could_potentially_enable() |
|---|
\ID_TEXTNotification code
\MEMBERMember to check against
\?SHORT_TEXTThe category within the notification code (null: none)
booleanWhether they couldmember_could_potentially_enable(\ID_TEXT $notification_code, \MEMBER $member_id, \?SHORT_TEXT $category = null) : boolean
\ID_TEXTNotification code
\MEMBERMember to check against
\?SHORT_TEXTThe category within the notification code (null: none)
booleanWhether they couldmember_has_enabled(\ID_TEXT $notification_code, \MEMBER $member_id, \?SHORT_TEXT $category = null) : boolean
(Separate implementation to list_members_who_have_enabled, for performance reasons.)
| inherited_from | \Hook_Notification::member_has_enabled() |
|---|
\ID_TEXTNotification code
\MEMBERMember to check against
\?SHORT_TEXTThe category within the notification code (null: none)
booleanWhether they aremember_has_enabled(\ID_TEXT $notification_code, \MEMBER $member_id, \?SHORT_TEXT $category = null) : boolean
(Separate implementation to list_members_who_have_enabled, for performance reasons.)
\ID_TEXTNotification code
\MEMBERMember to check against
\?SHORT_TEXTThe category within the notification code (null: none)
booleanWhether they havesupports_categories(\ID_TEXT $notification_code) : boolean
(Content types, for example, will define notifications on specific categories, not just in general. The categories are interpreted by the hook and may be complex. E.g. it might be like a regexp match, or like FORUM:3 or TOPIC:100)
\ID_TEXTNotification code
booleanWhether it does_all_members_who_have_enabled(\ID_TEXT $only_if_enabled_on__notification_code, \?SHORT_TEXT $only_if_enabled_on__category, \?array $to_member_ids, integer $start, integer $max, boolean $catch_all_too = true) : array
(No pagination supported, as assumed there are only a small set of members here.)
\ID_TEXTNotification code
\?SHORT_TEXTThe category within the notification code (null: none)
\?arrayList of member IDs we are restricting to (null: no restriction). This effectively works as a intersection set operator against those who have enabled.
integerStart position (for pagination)
integerMaximum (for pagination)
booleanWhether to find members who are subscribed regardless of notification code
arrayA pair: Map of members to their notification setting, and whether there may be more_all_members_who_have_enabled_with_category_access(array $to_filter, \ID_TEXT $category, \ID_TEXT $only_if_enabled_on__notification_code, \?SHORT_TEXT $only_if_enabled_on__category, \?array $to_member_ids, integer $start, integer $max) : array
arrayMembers from main query (we'll filter them)
\ID_TEXTThe category permission type
\ID_TEXTNotification code
\?SHORT_TEXTThe category within the notification code (null: none)
\?arrayList of member IDs we are restricting to (null: no restriction). This effectively works as a intersection set operator against those who have enabled.
integerStart position (for pagination)
integerMaximum (for pagination)
arrayA pair: Map of members to their notification setting, and whether there may be more_all_members_who_have_enabled_with_page_access(array $to_filter, \ID_TEXT $page, \ID_TEXT $only_if_enabled_on__notification_code, \?SHORT_TEXT $only_if_enabled_on__category, \?array $to_member_ids, integer $start, integer $max) : array
arrayMembers from main query (we'll filter them)
\ID_TEXTThe page
\ID_TEXTNotification code
\?SHORT_TEXTThe category within the notification code (null: none)
\?arrayList of member IDs we are restricting to (null: no restriction). This effectively works as a intersection set operator against those who have enabled.
integerStart position (for pagination)
integerMaximum (for pagination)
arrayA pair: Map of members to their notification setting, and whether there may be more_all_members_who_have_enabled_with_privilege(array $to_filter, \ID_TEXT $privilege, \ID_TEXT $only_if_enabled_on__notification_code, \?SHORT_TEXT $only_if_enabled_on__category, \?array $to_member_ids, integer $start, integer $max) : array
arrayMembers from main query (we'll filter them)
\ID_TEXTThe privilege
\ID_TEXTNotification code
\?SHORT_TEXTThe category within the notification code (null: none)
\?arrayList of member IDs we are restricting to (null: no restriction). This effectively works as a intersection set operator against those who have enabled.
integerStart position (for pagination)
integerMaximum (for pagination)
arrayA pair: Map of members to their notification setting, and whether there may be more_all_members_who_have_enabled_with_zone_access(array $to_filter, \ID_TEXT $zone, \ID_TEXT $only_if_enabled_on__notification_code, \?SHORT_TEXT $only_if_enabled_on__category, \?array $to_member_ids, integer $start, integer $max) : array
arrayMembers from main query (we'll filter them)
\ID_TEXTThe zone
\ID_TEXTNotification code
\?SHORT_TEXTThe category within the notification code (null: none)
\?arrayList of member IDs we are restricting to (null: no restriction). This effectively works as a intersection set operator against those who have enabled.
integerStart position (for pagination)
integerMaximum (for pagination)
arrayA pair: Map of members to their notification setting, and whether there may be more_all_staff_who_have_enabled(\ID_TEXT $only_if_enabled_on__notification_code, \?SHORT_TEXT $only_if_enabled_on__category, \?array $to_member_ids, integer $start, integer $max) : array
\ID_TEXTNotification code
\?SHORT_TEXTThe category within the notification code (null: none)
\?arrayList of member IDs we are restricting to (null: no restriction). This effectively works as a intersection set operator against those who have enabled.
integerStart position (for pagination)
integerMaximum (for pagination)
arrayA pair: Map of members to their notification setting, and whether there may be more_create_category_tree(\ID_TEXT $notification_code, \?ID_TEXT $id, boolean $for_any_member = false) : array
\ID_TEXTNotification code
\?ID_TEXTThe ID of where we're looking under (null: N/A)
booleanWhether to list anything monitored by any member (useful if you are calling this because you can't naturally enumerate what can be monitored)
arrayTree structure_is_member(\?ID_TEXT $only_if_enabled_on__notification_code, \?SHORT_TEXT $only_if_enabled_on__category, \MEMBER $member_id) : boolean
\?ID_TEXTNotification code (null: don't check if they are)
\?SHORT_TEXTThe category within the notification code (null: none)
\MEMBERMember to check against
booleanWhether they do_is_staff(\?ID_TEXT $only_if_enabled_on__notification_code, \?SHORT_TEXT $only_if_enabled_on__category, \MEMBER $member_id) : boolean
\?ID_TEXTNotification code (null: don't check if they are)
\?SHORT_TEXTThe category within the notification code (null: none)
\MEMBERMember to check against
booleanWhether they do