Function __global->get_ticket_posts
Definitions
sources/tickets2.php
- Get the posts from a given ticket, and also return the IDs of the forum and topic containing it. The return value is the same as that of get_forum_topic_posts(), except in error conditions.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $ticket_id | string | No | No | required parameter | N/A | N/A | The ticket ID |
| &$forum | ?AUTO_LINK | Yes | No | Null | N/A | N/A | Return location for the forum ID (null: don't collect) |
| &$topic_id | ?AUTO_LINK | Yes | No | Null | N/A | N/A | Return location for the topic ID (null: don't collect) |
| &$total_ticket_posts | ?integer | Yes | No | Null | N/A | N/A | Return total number of posts in the ticket (null: don't collect) |
| $start | integer | No | No | 0 | N/A | N/A | Start offset in pagination |
| $max | ?integer | No | No | Null | N/A | N/A | Max per page in pagination (null: no limit) |
Returns
- The array of maps (Each map is: title, message, member, date) (null: no such ticket)
- Type: ?mixed
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get the posts from a given ticket, and also return the IDs of the forum and topic containing it. The return value is the same as that of get_forum_topic_posts(), except in error conditions.
*
* @param string $ticket_id The ticket ID
* @param ?AUTO_LINK $forum Return location for the forum ID (null: don't collect)
* @param ?AUTO_LINK $topic_id Return location for the topic ID (null: don't collect)
* @param ?integer $total_ticket_posts Return total number of posts in the ticket (null: don't collect)
* @param integer $start Start offset in pagination
* @param ?integer $max Max per page in pagination (null: no limit)
* @return ?mixed The array of maps (Each map is: title, message, member, date) (null: no such ticket)
*/
function get_ticket_posts(string $ticket_id, ?int &$forum = null, ?int &$topic_id = null, ?int &$total_ticket_posts = null, int $start = 0, ?int $max = null)
* Get the posts from a given ticket, and also return the IDs of the forum and topic containing it. The return value is the same as that of get_forum_topic_posts(), except in error conditions.
*
* @param string $ticket_id The ticket ID
* @param ?AUTO_LINK $forum Return location for the forum ID (null: don't collect)
* @param ?AUTO_LINK $topic_id Return location for the topic ID (null: don't collect)
* @param ?integer $total_ticket_posts Return total number of posts in the ticket (null: don't collect)
* @param integer $start Start offset in pagination
* @param ?integer $max Max per page in pagination (null: no limit)
* @return ?mixed The array of maps (Each map is: title, message, member, date) (null: no such ticket)
*/
function get_ticket_posts(string $ticket_id, ?int &$forum = null, ?int &$topic_id = null, ?int &$total_ticket_posts = null, int $start = 0, ?int $max = null)
