# TicketEvent events

> 21 FeatherPanel plugin events on TicketEvent (20 emitted by the core): the event names, the arguments each listener gets, where they fire and a PHP listener for each.

Source: https://featherpanel.com/docs/plugins/events/ticket/

Part of the [plugin events reference](https://featherpanel.com/docs/plugins/events/). Listeners get the payload values as positional arguments in the order shown, cannot cancel the action, and must catch their own exceptions. 1 of these events are declared but no code emits them yet; they are marked not emitted.

## Setup

Import `TicketEvent` in your entry class and register listeners in `processEvents()`:

```php
<?php

namespace App\Addons\myplugin;

use App\App;
use App\Plugins\AppPlugin;
use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\TicketEvent;

class MyPlugin implements AppPlugin
{
    public static function processEvents(PluginEvents $event): void
    {
        $event->on(TicketEvent::onTicketAttachmentDeleted(), function ($ticket, $attachmentId, $userUuid): void {
            App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:ticket:attachment:deleted ' . json_encode(['ticket' => $ticket, 'attachment_id' => $attachmentId, 'user_uuid' => $userUuid]));
        });
    }

    public static function pluginInstall(): void
    {
    }

    public static function pluginUninstall(): void
    {
    }
}
```

## `TicketEvent::onTicketAttachmentCreated()`

- Name: `featherpanel:ticket:attachment:created`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/TicketEvent.php#L67)

Docblock: array ticket data, array attachment data, int attachment id, string user uuid.

| # | Payload key | Listener parameter | Type |
| --- | --- | --- | --- |
| 1 | `ticket` | `$ticket` | `array`from docblock |
| 2 | `attachment` | `$attachment` | `array`from docblock |
| 3 | `attachment_id` | `$attachmentId` | `int`from docblock |
| 4 | `user_uuid` | `$userUuid` | `string`from docblock |

When it fires (1 site)

-   [`TicketAttachmentsController::upload`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TicketAttachmentsController.php#L300)[`POST /api/admin/tickets/{uuid}/attachments`](https://featherpanel.com/docs/api/reference/admin/tickets/#post-admin-tickets-uuid-attachments)

```php
$event->on(TicketEvent::onTicketAttachmentCreated(), function ($ticket, $attachment, $attachmentId, $userUuid): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:ticket:attachment:created ' . json_encode(['ticket' => $ticket, 'attachment' => $attachment, 'attachment_id' => $attachmentId, 'user_uuid' => $userUuid]));
});
```

## `TicketEvent::onTicketAttachmentDeleted()`

- Name: `featherpanel:ticket:attachment:deleted`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/TicketEvent.php#L75)

Docblock: array ticket data, int attachment id, string user uuid.

| # | Payload key | Listener parameter | Type |
| --- | --- | --- | --- |
| 1 | `ticket` | `$ticket` | `array`from docblock |
| 2 | `attachment_id` | `$attachmentId` | `int` |
| 3 | `user_uuid` | `$userUuid` | `string`from docblock |

When it fires (1 site)

-   [`TicketAttachmentsController::delete`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TicketAttachmentsController.php#L449)[`DELETE /api/admin/tickets/{uuid}/attachments/{attachmentId}`](https://featherpanel.com/docs/api/reference/admin/tickets/#delete-admin-tickets-uuid-attachments-attachmentId)

```php
$event->on(TicketEvent::onTicketAttachmentDeleted(), function ($ticket, $attachmentId, $userUuid): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:ticket:attachment:deleted ' . json_encode(['ticket' => $ticket, 'attachment_id' => $attachmentId, 'user_uuid' => $userUuid]));
});
```

## `TicketEvent::onTicketAttachmentUpdated()`

- Name: `featherpanel:ticket:attachment:updated`
- not emitted
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/TicketEvent.php#L187)

Docblock: array ticket data, array attachment data, array updated data, int attachment id, string user uuid.

```php
$event->on(TicketEvent::onTicketAttachmentUpdated(), function (...$args): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:ticket:attachment:updated ' . json_encode($args));
});
```

No code emits this event yet, so the arguments are unknown. The listener accepts any.

## `TicketEvent::onTicketCategoryCreated()`

- Name: `featherpanel:ticket:category:created`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/TicketEvent.php#L107)

Docblock: array category data, int category id, string user uuid.

| # | Payload key | Listener parameter | Type |
| --- | --- | --- | --- |
| 1 | `category` | `$category` | `array`from docblock |
| 2 | `category_id` | `$categoryId` | `int`from docblock |
| 3 | `user_uuid` | `$userUuid` | `string`from docblock |

When it fires (1 site)

-   [`TicketCategoriesController::create`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TicketCategoriesController.php#L291)[`PUT /api/admin/tickets/categories`](https://featherpanel.com/docs/api/reference/admin/tickets/#put-admin-tickets-categories)

```php
$event->on(TicketEvent::onTicketCategoryCreated(), function ($category, $categoryId, $userUuid): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:ticket:category:created ' . json_encode(['category' => $category, 'category_id' => $categoryId, 'user_uuid' => $userUuid]));
});
```

## `TicketEvent::onTicketCategoryDeleted()`

- Name: `featherpanel:ticket:category:deleted`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/TicketEvent.php#L123)

Docblock: array category data, int category id, string user uuid.

| # | Payload key | Listener parameter | Type |
| --- | --- | --- | --- |
| 1 | `category` | `$category` | `array`from docblock |
| 2 | `category_id` | `$categoryId` | `int` |
| 3 | `user_uuid` | `$userUuid` | `string`from docblock |

When it fires (1 site)

-   [`TicketCategoriesController::delete`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TicketCategoriesController.php#L462)[`DELETE /api/admin/tickets/categories/{id}`](https://featherpanel.com/docs/api/reference/admin/tickets/#delete-admin-tickets-categories-id)

```php
$event->on(TicketEvent::onTicketCategoryDeleted(), function ($category, $categoryId, $userUuid): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:ticket:category:deleted ' . json_encode(['category' => $category, 'category_id' => $categoryId, 'user_uuid' => $userUuid]));
});
```

## `TicketEvent::onTicketCategoryUpdated()`

- Name: `featherpanel:ticket:category:updated`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/TicketEvent.php#L115)

Docblock: array category data, array updated data, int category id, string user uuid.

| # | Payload key | Listener parameter | Type |
| --- | --- | --- | --- |
| 1 | `category` | `$category` | `array`from docblock |
| 2 | `updated_data` | `$updatedData` | `array`from docblock |
| 3 | `category_id` | `$categoryId` | `int` |
| 4 | `user_uuid` | `$userUuid` | `string`from docblock |

When it fires (1 site)

-   [`TicketCategoriesController::update`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TicketCategoriesController.php#L388)[`PATCH /api/admin/tickets/categories/{id}`](https://featherpanel.com/docs/api/reference/admin/tickets/#patch-admin-tickets-categories-id)

```php
$event->on(TicketEvent::onTicketCategoryUpdated(), function ($category, $updatedData, $categoryId, $userUuid): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:ticket:category:updated ' . json_encode(['category' => $category, 'updated_data' => $updatedData, 'category_id' => $categoryId, 'user_uuid' => $userUuid]));
});
```

## `TicketEvent::onTicketClosed()`

- Name: `featherpanel:ticket:closed`
- emitted at 2 sites
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/TicketEvent.php#L91)

Docblock: array ticket data, string user uuid.

| # | Payload key | Listener parameter | Type |
| --- | --- | --- | --- |
| 1 | `ticket` | `$ticket` | `array`from docblock |
| 2 | `user_uuid` | `$userUuid` | `string`from docblock |

When it fires (2 sites)

-   [`TicketsController::update`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TicketsController.php#L720)[`PATCH /api/admin/tickets/{uuid}`](https://featherpanel.com/docs/api/reference/admin/tickets/#patch-admin-tickets-uuid)
-   [`TicketsController::close`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TicketsController.php#L890)[`POST /api/admin/tickets/{uuid}/close`](https://featherpanel.com/docs/api/reference/admin/tickets/#post-admin-tickets-uuid-close)

```php
$event->on(TicketEvent::onTicketClosed(), function ($ticket, $userUuid): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:ticket:closed ' . json_encode(['ticket' => $ticket, 'user_uuid' => $userUuid]));
});
```

## `TicketEvent::onTicketCreated()`

- Name: `featherpanel:ticket:created`
- emitted at 3 sites
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/TicketEvent.php#L27)

Docblock: array ticket data, int ticket id, string user uuid.

| # | Payload key | Listener parameter | Type |
| --- | --- | --- | --- |
| 1 | `ticket` | `$ticket` | `array`from docblock |
| 2 | `ticket_id` | `$ticketId` | `int`from docblock |
| 3 | `user_uuid` | `$userUuid` | `string`from docblock |

When it fires (3 sites)

-   [`TicketsController::create`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TicketsController.php#L551)[`PUT /api/admin/tickets`](https://featherpanel.com/docs/api/reference/admin/tickets/#put-admin-tickets)
-   [`TicketsController::create`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/TicketsController.php#L428)[`PUT /api/user/tickets`](https://featherpanel.com/docs/api/reference/user/tickets/#put-user-tickets)
-   [`SessionController::requestDataExport`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/User/SessionController.php#L582)[`POST /api/user/data-request`](https://featherpanel.com/docs/api/reference/user/session/#post-user-data-request)

```php
$event->on(TicketEvent::onTicketCreated(), function ($ticket, $ticketId, $userUuid): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:ticket:created ' . json_encode(['ticket' => $ticket, 'ticket_id' => $ticketId, 'user_uuid' => $userUuid]));
});
```

## `TicketEvent::onTicketDeleted()`

- Name: `featherpanel:ticket:deleted`
- emitted at 2 sites
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/TicketEvent.php#L43)

Docblock: array ticket data, string user uuid.

| # | Payload key | Listener parameter | Type |
| --- | --- | --- | --- |
| 1 | `ticket` | `$ticket` | `array`from docblock |
| 2 | `user_uuid` | `$userUuid` | `string`from docblock |

When it fires (2 sites)

-   [`TicketsController::delete`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TicketsController.php#L804)[`DELETE /api/admin/tickets/{uuid}`](https://featherpanel.com/docs/api/reference/admin/tickets/#delete-admin-tickets-uuid)
-   [`TicketsController::delete`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/TicketsController.php#L994)[`DELETE /api/user/tickets/{uuid}`](https://featherpanel.com/docs/api/reference/user/tickets/#delete-user-tickets-uuid)

```php
$event->on(TicketEvent::onTicketDeleted(), function ($ticket, $userUuid): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:ticket:deleted ' . json_encode(['ticket' => $ticket, 'user_uuid' => $userUuid]));
});
```

## `TicketEvent::onTicketMessageCreated()`

- Name: `featherpanel:ticket:message:created`
- emitted at 3 sites
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/TicketEvent.php#L51)

Docblock: array ticket data, array message data, int message id, string user uuid.

| # | Payload key | Listener parameter | Type |
| --- | --- | --- | --- |
| 1 | `ticket` | `$ticket` | `array`from docblock |
| 2 | `message` | `$message` | `array`from docblock |
| 3 | `message_id` | `$messageId` | `int`from docblock |
| 4 | `user_uuid` | `$userUuid` | `string`from docblock |

When it fires (3 sites)

-   [`TicketMessagesController::create`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TicketMessagesController.php#L288)[`POST /api/admin/tickets/{uuid}/messages`](https://featherpanel.com/docs/api/reference/admin/tickets/#post-admin-tickets-uuid-messages)
-   [`TicketsController::reply`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TicketsController.php#L1078)[`POST /api/admin/tickets/{uuid}/reply`](https://featherpanel.com/docs/api/reference/admin/tickets/#post-admin-tickets-uuid-reply)
-   [`TicketsController::reply`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/TicketsController.php#L535)[`POST /api/user/tickets/{uuid}/reply`](https://featherpanel.com/docs/api/reference/user/tickets/#post-user-tickets-uuid-reply)

```php
$event->on(TicketEvent::onTicketMessageCreated(), function ($ticket, $message, $messageId, $userUuid): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:ticket:message:created ' . json_encode(['ticket' => $ticket, 'message' => $message, 'message_id' => $messageId, 'user_uuid' => $userUuid]));
});
```

## `TicketEvent::onTicketMessageDeleted()`

- Name: `featherpanel:ticket:message:deleted`
- emitted at 2 sites
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/TicketEvent.php#L59)

Docblock: array ticket data, int message id, string user uuid.

| # | Payload key | Listener parameter | Type |
| --- | --- | --- | --- |
| 1 | `ticket` | `$ticket` | `array`from docblock |
| 2 | `message_id` | `$messageId` | `int` |
| 3 | `user_uuid` | `$userUuid` | `string`from docblock |

When it fires (2 sites)

-   [`TicketMessagesController::delete`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TicketMessagesController.php#L503)[`DELETE /api/admin/tickets/{uuid}/messages/{id}`](https://featherpanel.com/docs/api/reference/admin/tickets/#delete-admin-tickets-uuid-messages-id)
-   [`TicketsController::deleteMessage`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/TicketsController.php#L873)[`DELETE /api/user/tickets/{uuid}/messages/{id}`](https://featherpanel.com/docs/api/reference/user/tickets/#delete-user-tickets-uuid-messages-id)

```php
$event->on(TicketEvent::onTicketMessageDeleted(), function ($ticket, $messageId, $userUuid): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:ticket:message:deleted ' . json_encode(['ticket' => $ticket, 'message_id' => $messageId, 'user_uuid' => $userUuid]));
});
```

## `TicketEvent::onTicketMessageUpdated()`

- Name: `featherpanel:ticket:message:updated`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/TicketEvent.php#L179)

Docblock: array ticket data, array message data, array updated data, int message id, string user uuid.

| # | Payload key | Listener parameter | Type |
| --- | --- | --- | --- |
| 1 | `ticket` | `$ticket` | `array`from docblock |
| 2 | `message` | `$message` | `array`from docblock |
| 3 | `updated_data` | `$updatedData` | `array`from docblock |
| 4 | `message_id` | `$messageId` | `int` |
| 5 | `user_uuid` | `$userUuid` | `string`from docblock |

When it fires (1 site)

-   [`TicketMessagesController::update`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TicketMessagesController.php#L411)[`PATCH /api/admin/tickets/{uuid}/messages/{id}`](https://featherpanel.com/docs/api/reference/admin/tickets/#patch-admin-tickets-uuid-messages-id)

```php
$event->on(TicketEvent::onTicketMessageUpdated(), function ($ticket, $message, $updatedData, $messageId, $userUuid): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:ticket:message:updated ' . json_encode(['ticket' => $ticket, 'message' => $message, 'updated_data' => $updatedData, 'message_id' => $messageId, 'user_uuid' => $userUuid]));
});
```

## `TicketEvent::onTicketPriorityCreated()`

- Name: `featherpanel:ticket:priority:created`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/TicketEvent.php#L155)

Docblock: array priority data, int priority id, string user uuid.

| # | Payload key | Listener parameter | Type |
| --- | --- | --- | --- |
| 1 | `priority` | `$priority` | `array`from docblock |
| 2 | `priority_id` | `$priorityId` | `int`from docblock |
| 3 | `user_uuid` | `$userUuid` | `string`from docblock |

When it fires (1 site)

-   [`TicketPrioritiesController::create`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TicketPrioritiesController.php#L271)[`PUT /api/admin/tickets/priorities`](https://featherpanel.com/docs/api/reference/admin/tickets/#put-admin-tickets-priorities)

```php
$event->on(TicketEvent::onTicketPriorityCreated(), function ($priority, $priorityId, $userUuid): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:ticket:priority:created ' . json_encode(['priority' => $priority, 'priority_id' => $priorityId, 'user_uuid' => $userUuid]));
});
```

## `TicketEvent::onTicketPriorityDeleted()`

- Name: `featherpanel:ticket:priority:deleted`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/TicketEvent.php#L171)

Docblock: array priority data, int priority id, string user uuid.

| # | Payload key | Listener parameter | Type |
| --- | --- | --- | --- |
| 1 | `priority` | `$priority` | `array`from docblock |
| 2 | `priority_id` | `$priorityId` | `int` |
| 3 | `user_uuid` | `$userUuid` | `string`from docblock |

When it fires (1 site)

-   [`TicketPrioritiesController::delete`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TicketPrioritiesController.php#L435)[`DELETE /api/admin/tickets/priorities/{id}`](https://featherpanel.com/docs/api/reference/admin/tickets/#delete-admin-tickets-priorities-id)

```php
$event->on(TicketEvent::onTicketPriorityDeleted(), function ($priority, $priorityId, $userUuid): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:ticket:priority:deleted ' . json_encode(['priority' => $priority, 'priority_id' => $priorityId, 'user_uuid' => $userUuid]));
});
```

## `TicketEvent::onTicketPriorityUpdated()`

- Name: `featherpanel:ticket:priority:updated`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/TicketEvent.php#L163)

Docblock: array priority data, array updated data, int priority id, string user uuid.

| # | Payload key | Listener parameter | Type |
| --- | --- | --- | --- |
| 1 | `priority` | `$priority` | `array`from docblock |
| 2 | `updated_data` | `$updatedData` | `array`from docblock |
| 3 | `priority_id` | `$priorityId` | `int` |
| 4 | `user_uuid` | `$userUuid` | `string`from docblock |

When it fires (1 site)

-   [`TicketPrioritiesController::update`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TicketPrioritiesController.php#L366)[`PATCH /api/admin/tickets/priorities/{id}`](https://featherpanel.com/docs/api/reference/admin/tickets/#patch-admin-tickets-priorities-id)

```php
$event->on(TicketEvent::onTicketPriorityUpdated(), function ($priority, $updatedData, $priorityId, $userUuid): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:ticket:priority:updated ' . json_encode(['priority' => $priority, 'updated_data' => $updatedData, 'priority_id' => $priorityId, 'user_uuid' => $userUuid]));
});
```

## `TicketEvent::onTicketReopened()`

- Name: `featherpanel:ticket:reopened`
- emitted at 2 sites
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/TicketEvent.php#L99)

Docblock: array ticket data, string user uuid.

| # | Payload key | Listener parameter | Type |
| --- | --- | --- | --- |
| 1 | `ticket` | `$ticket` | `array`from docblock |
| 2 | `user_uuid` | `$userUuid` | `string`from docblock |

When it fires (2 sites)

-   [`TicketsController::update`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TicketsController.php#L729)[`PATCH /api/admin/tickets/{uuid}`](https://featherpanel.com/docs/api/reference/admin/tickets/#patch-admin-tickets-uuid)
-   [`TicketsController::reopen`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TicketsController.php#L968)[`POST /api/admin/tickets/{uuid}/reopen`](https://featherpanel.com/docs/api/reference/admin/tickets/#post-admin-tickets-uuid-reopen)

```php
$event->on(TicketEvent::onTicketReopened(), function ($ticket, $userUuid): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:ticket:reopened ' . json_encode(['ticket' => $ticket, 'user_uuid' => $userUuid]));
});
```

## `TicketEvent::onTicketStatusChanged()`

- Name: `featherpanel:ticket:status:changed`
- emitted at 3 sites
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/TicketEvent.php#L83)

Docblock: array ticket data, string old status, string new status, string user uuid.

| # | Payload key | Listener parameter | Type |
| --- | --- | --- | --- |
| 1 | `ticket` | `$ticket` | `array`from docblock |
| 2 | `old_status` | `$oldStatus` | `null` |
| 3 | `new_status` | `$newStatus` | `string` |
| 4 | `user_uuid` | `$userUuid` | `string`from docblock |

When it fires (3 sites)

-   [`TicketsController::update`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TicketsController.php#L708)[`PATCH /api/admin/tickets/{uuid}`](https://featherpanel.com/docs/api/reference/admin/tickets/#patch-admin-tickets-uuid)
-   [`TicketsController::close`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TicketsController.php#L880)[`POST /api/admin/tickets/{uuid}/close`](https://featherpanel.com/docs/api/reference/admin/tickets/#post-admin-tickets-uuid-close)
-   [`TicketsController::reopen`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TicketsController.php#L958)[`POST /api/admin/tickets/{uuid}/reopen`](https://featherpanel.com/docs/api/reference/admin/tickets/#post-admin-tickets-uuid-reopen)

```php
$event->on(TicketEvent::onTicketStatusChanged(), function ($ticket, $oldStatus, $newStatus, $userUuid): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:ticket:status:changed ' . json_encode(['ticket' => $ticket, 'new_status' => $newStatus, 'user_uuid' => $userUuid]));
});
```

## `TicketEvent::onTicketStatusCreated()`

- Name: `featherpanel:ticket:status:created`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/TicketEvent.php#L131)

Docblock: array status data, int status id, string user uuid.

| # | Payload key | Listener parameter | Type |
| --- | --- | --- | --- |
| 1 | `status` | `$status` | `array`from docblock |
| 2 | `status_id` | `$statusId` | `int`from docblock |
| 3 | `user_uuid` | `$userUuid` | `string`from docblock |

When it fires (1 site)

-   [`TicketStatusesController::create`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TicketStatusesController.php#L274)[`PUT /api/admin/tickets/statuses`](https://featherpanel.com/docs/api/reference/admin/tickets/#put-admin-tickets-statuses)

```php
$event->on(TicketEvent::onTicketStatusCreated(), function ($status, $statusId, $userUuid): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:ticket:status:created ' . json_encode(['status' => $status, 'status_id' => $statusId, 'user_uuid' => $userUuid]));
});
```

## `TicketEvent::onTicketStatusDeleted()`

- Name: `featherpanel:ticket:status:deleted`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/TicketEvent.php#L147)

Docblock: array status data, int status id, string user uuid.

| # | Payload key | Listener parameter | Type |
| --- | --- | --- | --- |
| 1 | `status` | `$status` | `array`from docblock |
| 2 | `status_id` | `$statusId` | `int` |
| 3 | `user_uuid` | `$userUuid` | `string`from docblock |

When it fires (1 site)

-   [`TicketStatusesController::delete`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TicketStatusesController.php#L438)[`DELETE /api/admin/tickets/statuses/{id}`](https://featherpanel.com/docs/api/reference/admin/tickets/#delete-admin-tickets-statuses-id)

```php
$event->on(TicketEvent::onTicketStatusDeleted(), function ($status, $statusId, $userUuid): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:ticket:status:deleted ' . json_encode(['status' => $status, 'status_id' => $statusId, 'user_uuid' => $userUuid]));
});
```

## `TicketEvent::onTicketStatusUpdated()`

- Name: `featherpanel:ticket:status:updated`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/TicketEvent.php#L139)

Docblock: array status data, array updated data, int status id, string user uuid.

| # | Payload key | Listener parameter | Type |
| --- | --- | --- | --- |
| 1 | `status` | `$status` | `array`from docblock |
| 2 | `updated_data` | `$updatedData` | `array`from docblock |
| 3 | `status_id` | `$statusId` | `int` |
| 4 | `user_uuid` | `$userUuid` | `string`from docblock |

When it fires (1 site)

-   [`TicketStatusesController::update`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TicketStatusesController.php#L369)[`PATCH /api/admin/tickets/statuses/{id}`](https://featherpanel.com/docs/api/reference/admin/tickets/#patch-admin-tickets-statuses-id)

```php
$event->on(TicketEvent::onTicketStatusUpdated(), function ($status, $updatedData, $statusId, $userUuid): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:ticket:status:updated ' . json_encode(['status' => $status, 'updated_data' => $updatedData, 'status_id' => $statusId, 'user_uuid' => $userUuid]));
});
```

## `TicketEvent::onTicketUpdated()`

- Name: `featherpanel:ticket:updated`
- emitted at 1 site
- Cancel or modify: no
- [definition](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Plugins/Events/Events/TicketEvent.php#L35)

Docblock: array ticket data, array updated data, string user uuid.

| # | Payload key | Listener parameter | Type |
| --- | --- | --- | --- |
| 1 | `ticket` | `$ticket` | `array`from docblock |
| 2 | `updated_data` | `$updatedData` | `array`from docblock |
| 3 | `user_uuid` | `$userUuid` | `string`from docblock |

When it fires (1 site)

-   [`TicketsController::update`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/TicketsController.php#L697)[`PATCH /api/admin/tickets/{uuid}`](https://featherpanel.com/docs/api/reference/admin/tickets/#patch-admin-tickets-uuid)

```php
$event->on(TicketEvent::onTicketUpdated(), function ($ticket, $updatedData, $userUuid): void {
    App::getInstance(true)->getLogger()->info('[myplugin] featherpanel:ticket:updated ' . json_encode(['ticket' => $ticket, 'updated_data' => $updatedData, 'user_uuid' => $userUuid]));
});
```
