/** * @param Ticket $ticket * @return void */ private function processDeleteTicket(Ticket $ticket) { $attachments = $ticket->getAttachments(); foreach ($attachments as $attachment) { $this->attachmentManager->deleteAttachment($attachment); } $this->ticketRepository->remove($ticket); $this->dispatchWorkflowEvent($this->doctrineRegistry, $this->dispatcher, $ticket); }
/** * @param Ticket $ticket * @return void */ private function processDeleteTicket(Ticket $ticket) { $attachments = $ticket->getAttachments(); $ticket->delete(); foreach ($attachments as $attachment) { $this->attachmentManager->deleteAttachment($attachment); } $this->dispatchEvents($ticket); $this->ticketRepository->remove($ticket); }