Function __global->send_pt_notification
Definitions
sources/cns_topics_action2.php
- Send a new-PT notification.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $post_id | AUTO_LINK | No | No | required parameter | N/A | N/A | The ID of the post made |
| $subject | SHORT_TEXT | No | No | required parameter | N/A | N/A | PT title |
| $topic_id | AUTO_LINK | No | No | required parameter | N/A | N/A | ID of the topic |
| $to_id | MEMBER | No | No | required parameter | N/A | N/A | Member getting the PT |
| $from_id | ?MEMBER | No | No | Null | N/A | N/A | Member posting the PT (null: current member) |
| $post_comcode | ?string | No | No | Null | N/A | N/A | Post text (null: unknown, lookup from $post_id) |
| $mark_unread | boolean | No | No | False | N/A | N/A | Whether to also mark the topic as unread |
Preview
Code (PHP)
/**
* Send a new-PT notification.
*
* @param AUTO_LINK $post_id The ID of the post made
* @param SHORT_TEXT $subject PT title
* @param AUTO_LINK $topic_id ID of the topic
* @param MEMBER $to_id Member getting the PT
* @param ?MEMBER $from_id Member posting the PT (null: current member)
* @param ?string $post_comcode Post text (null: unknown, lookup from $post_id)
* @param boolean $mark_unread Whether to also mark the topic as unread
*/
function send_pt_notification(int $post_id, string $subject, int $topic_id, int $to_id, ?int $from_id = null, ?string $post_comcode = null, bool $mark_unread = false)
* Send a new-PT notification.
*
* @param AUTO_LINK $post_id The ID of the post made
* @param SHORT_TEXT $subject PT title
* @param AUTO_LINK $topic_id ID of the topic
* @param MEMBER $to_id Member getting the PT
* @param ?MEMBER $from_id Member posting the PT (null: current member)
* @param ?string $post_comcode Post text (null: unknown, lookup from $post_id)
* @param boolean $mark_unread Whether to also mark the topic as unread
*/
function send_pt_notification(int $post_id, string $subject, int $topic_id, int $to_id, ?int $from_id = null, ?string $post_comcode = null, bool $mark_unread = false)
