Function Notification_dispatcher->__construct

Definitions

sources/notifications.php

  • Construct notification dispatcher.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

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 use
$code_category ?SHORT_TEXT No No required parameter N/A N/A The category within the notification code (null: none). If it is to have $create_ticket, it must have the format <type>_<id>
$subject SHORT_TEXT No No required parameter N/A N/A Message subject (in Comcode)
$message LONG_TEXT No No required parameter N/A N/A Message body (in Comcode)
$to_member_ids ?array No No required parameter N/A N/A List of enabled members to limit sending to (null: everyone)
$from_member_id ?integer No No required parameter N/A N/A The member ID doing the sending. Either a MEMBER or a negative number (e.g. A_FROM_SYSTEM_UNPRIVILEGED) (null: current member)
$notification_hook ?string No No required parameter N/A N/A Notification hook $notification_code exists in (null: auto-detect)

Preview

Code (PHP)

/**
 * Construct notification dispatcher.
 *
 * @param  ID_TEXT $notification_code The notification code to use
 * @param  ?SHORT_TEXT $code_category The category within the notification code (null: none). If it is to have $create_ticket, it must have the format <type>_<id>
 * @param  SHORT_TEXT $subject Message subject (in Comcode)
 * @param  LONG_TEXT $message Message body (in Comcode)
 * @param  ?array $to_member_ids List of enabled members to limit sending to (null: everyone)
 * @param  ?integer $from_member_id The member ID doing the sending. Either a MEMBER or a negative number (e.g. A_FROM_SYSTEM_UNPRIVILEGED) (null: current member)
 * @param  ?string $notification_hook Notification hook $notification_code exists in (null: auto-detect)
 */

public function __construct(string $notification_code, ?string $code_category, string $subject, string $message, ?array $to_member_ids, ?int $from_member_id, ?string $notification_hook)