OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)
This commit is contained in:
39
app/Domain/Tickets/Events/TicketDeleted.php
Normal file
39
app/Domain/Tickets/Events/TicketDeleted.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace Leantime\Domain\Tickets\Events;
|
||||
|
||||
use Leantime\Core\Events\Concerns\InteractsWithEvents;
|
||||
use Leantime\Core\Events\Contracts\LeantimeEvent;
|
||||
|
||||
/**
|
||||
* Fired after a ticket was deleted.
|
||||
*/
|
||||
final class TicketDeleted implements LeantimeEvent
|
||||
{
|
||||
use InteractsWithEvents;
|
||||
|
||||
/**
|
||||
* @param int $ticketId The deleted ticket id.
|
||||
* @param string|null $legacyHook TEMPORARY (migration window): the emitting method name —
|
||||
* pass __FUNCTION__ — used to rebuild the exact historical
|
||||
* string name this site fired under for plugin listeners.
|
||||
*/
|
||||
public function __construct(
|
||||
public readonly int $ticketId,
|
||||
private readonly ?string $legacyHook = null,
|
||||
) {}
|
||||
|
||||
/**
|
||||
* The exact historical string name of the emitting site. Remove with the migration window.
|
||||
*
|
||||
* @return array<int, string>
|
||||
*/
|
||||
public function legacyHooks(): array
|
||||
{
|
||||
if ($this->legacyHook === null) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return ['leantime.domain.tickets.services.tickets.'.$this->legacyHook.'.ticket_deleted'];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user