Function __global->get_ticket_forum_id
Definitions
sources/tickets.php
- Get the forum ID for a given ticket type and member, taking the ticket_type_forums option into account.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: int
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $ticket_type_id | ?integer | No | No | Null | N/A | N/A | The ticket type (null: all ticket types) |
| $create | boolean | No | No | False | N/A | N/A | Create the forum if it's missing |
| $silent_error_handling | boolean | No | No | False | N/A | N/A | Whether to skip showing errors, returning null instead |
Returns
- Forum ID (null: not found)
- Type: ?AUTO_LINK
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get the forum ID for a given ticket type and member, taking the ticket_type_forums option into account.
*
* @param ?integer $ticket_type_id The ticket type (null: all ticket types)
* @param boolean $create Create the forum if it's missing
* @param boolean $silent_error_handling Whether to skip showing errors, returning null instead
* @return ?AUTO_LINK Forum ID (null: not found)
*/
function get_ticket_forum_id(?int $ticket_type_id = null, bool $create = false, bool $silent_error_handling = false) : ?int
* Get the forum ID for a given ticket type and member, taking the ticket_type_forums option into account.
*
* @param ?integer $ticket_type_id The ticket type (null: all ticket types)
* @param boolean $create Create the forum if it's missing
* @param boolean $silent_error_handling Whether to skip showing errors, returning null instead
* @return ?AUTO_LINK Forum ID (null: not found)
*/
function get_ticket_forum_id(?int $ticket_type_id = null, bool $create = false, bool $silent_error_handling = false) : ?int
