Function __global->get_tickets
Definitions
sources/tickets.php
- Get an array of tickets for the given member and ticket type.If the member has permission to see others' tickets, it will be a list of all tickets in the system, restricted by ticket type as appropriate. Otherwise, it will be a list of that member's tickets, as restricted by ticket type.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $filters | array | No | No | [] | N/A | N/A | A map of filters; supports: ticket_type_id (AUTO_LINK), only_owner_id (MEMBER), only_assigned_id (MEMBER), only_open (boolean) |
| $include_first_posts | boolean | No | No | False | N/A | N/A | Whether to include first posts |
| $silent_error_handling | boolean | No | No | False | N/A | N/A | Whether to skip showing errors, returning null instead |
Returns
- Array of tickets, empty on failure
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get an array of tickets for the given member and ticket type.If the member has permission to see others' tickets, it will be a list of all tickets in the system, restricted by ticket type as appropriate. Otherwise, it will be a list of that member's tickets, as restricted by ticket type.
*
* @param array $filters A map of filters; supports: ticket_type_id (AUTO_LINK), only_owner_id (MEMBER), only_assigned_id (MEMBER), only_open (boolean)
* @param boolean $include_first_posts Whether to include first posts
* @param boolean $silent_error_handling Whether to skip showing errors, returning null instead
* @return array Array of tickets, empty on failure
*/
function get_tickets(array $filters = [], bool $include_first_posts = false, bool $silent_error_handling = false) : array
* Get an array of tickets for the given member and ticket type.If the member has permission to see others' tickets, it will be a list of all tickets in the system, restricted by ticket type as appropriate. Otherwise, it will be a list of that member's tickets, as restricted by ticket type.
*
* @param array $filters A map of filters; supports: ticket_type_id (AUTO_LINK), only_owner_id (MEMBER), only_assigned_id (MEMBER), only_open (boolean)
* @param boolean $include_first_posts Whether to include first posts
* @param boolean $silent_error_handling Whether to skip showing errors, returning null instead
* @return array Array of tickets, empty on failure
*/
function get_tickets(array $filters = [], bool $include_first_posts = false, bool $silent_error_handling = false) : array
