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_TEXT
The notification code to use
\?SHORT_TEXT
The category within the notification code (null: none). If it is to have $store_in_staff_messagingsystem, it must have the format
\SHORT_TEXT
Message subject (in Comcode)
\LONG_TEXT
Message body (in Comcode)
\?array
List of enabled members to limit sending to (null: everyone)
\?integer
The member ID doing the sending. Either a MEMBER or a negative number (e.g. A_FROM_SYSTEM_UNPRIVILEGED) (null: current member)
integer
The message priority (1=urgent, 3=normal, 5=low)
boolean
Whether to create a topic for discussion (ignored if the staff_messaging addon not installed)
boolean
Whether to NOT CC to the CC address
\?ID_TEXT
DO NOT send notifications to: The notification code (null: no restriction)
\?SHORT_TEXT
DO NOT send notifications to: The category within the notification code (null: none / no restriction)
string
Only relevant if $store_in_staff_messaging_system is true: subject prefix for storage
string
Only relevant if $store_in_staff_messaging_system is true: subject suffix for storage
string
Only relevant if $store_in_staff_messaging_system is true: body prefix for storage
string
Only relevant if $store_in_staff_messaging_system is true: body suffix for storage
\?array
A list of attachments (each attachment being a map, path=>filename) (null: none)
boolean
Whether 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