Dispatcher object.
Used to create a closure for a notification dispatch, so we can then tell that to send in the background (register_shutdown_function), for performance reasons.
| package | core_notifications |
|---|
__construct(\ID_TEXT $notification_code, \?SHORT_TEXT $code_category, \SHORT_TEXT $subject, \LONG_TEXT $message, \?array $to_member_ids, \?integer $from_member_id, integer $priority, boolean $store_in_staff_messaging_system, boolean $no_cc, \?ID_TEXT $no_notify_for__notification_code, \?SHORT_TEXT $no_notify_for__code_category, string $subject_prefix= '', string $subject_suffix= '', string $body_prefix= '', string $body_suffix= '', \?array $attachments= null, boolean $use_real_from= false)
| range | 1 5 |
|---|
\ID_TEXTThe notification code to use
\?SHORT_TEXTThe category within the notification code (null: none). If it is to have $store_in_staff_messagingsystem, it must have the format
\SHORT_TEXTMessage subject (in Comcode)
\LONG_TEXTMessage body (in Comcode)
\?arrayList of enabled members to limit sending to (null: everyone)
\?integerThe member ID doing the sending. Either a MEMBER or a negative number (e.g. A_FROM_SYSTEM_UNPRIVILEGED) (null: current member)
integerThe message priority (1=urgent, 3=normal, 5=low)
booleanWhether to create a topic for discussion (ignored if the staff_messaging addon not installed)
booleanWhether to NOT CC to the CC address
\?ID_TEXTDO NOT send notifications to: The notification code (null: no restriction)
\?SHORT_TEXTDO NOT send notifications to: The category within the notification code (null: none / no restriction)
stringOnly relevant if $store_in_staff_messaging_system is true: subject prefix for storage
stringOnly relevant if $store_in_staff_messaging_system is true: subject suffix for storage
stringOnly relevant if $store_in_staff_messaging_system is true: body prefix for storage
stringOnly relevant if $store_in_staff_messaging_system is true: body suffix for storage
\?arrayA list of attachments (each attachment being a map, path=>filename) (null: none)
booleanWhether we will make a "reply to" direct -- we only do this if we're allowed to disclose email addresses for this particular notification type (i.e. if it's a direct contact)
dispatch()
$body_prefix
''$body_suffix
''$code_category
null$from_member_id
null$no_cc
null$no_notify_for__code_category
null$no_notify_for__notification_code
null$notification_code
null$priority
null$store_in_staff_messaging_system
null$subject
null$subject_prefix
''$subject_suffix
''$to_member_ids
null$use_real_from
false