get('net15.ticket.tickets.manager')->getByPublicKey($publicKey); return $this->render("@TicketSupport/TicketMessage/default.html.twig", [ 'ticketItem' => $ticket ]); } /** * @param string $publicKey * @param Request $request * @return Response */ public function addMessageAction(string $publicKey, Request $request) { $ticket = $this->get('net15.ticket.tickets.manager')->getByPublicKey($publicKey); $ticketItem = $this->get('net15.ticket.tickets.manager')->addMessage($ticket, $request->get('message')); if ($this->isGranted('ROLE_ADMIN') || $this->isGranted('ROLE_SUPPORT_ADMIN') || $this->isGranted('ROLE_EURO')){ $this->get('net15.ticket.mail.notification')->sendMailNotification($ticketItem); } return $this->render("@TicketSupport/TicketMessage/message.block.html.twig", [ 'ticketItem' => $ticketItem ]); } public function refreshMessageAction($publicKey){ return $this->render("@TicketSupport/TicketMessage/message.block.html.twig", [ 'ticketItem' => $this->get('net15.ticket.tickets.manager')->getByPublicKey($publicKey) ]); } public function deleteMessageAction(Request $request){ $ticketItem = $this->get('net15.ticket.tickets.manager')->getByPublicKey($request->get('ticket_publicKey')); $messageIsDeleted = $this->get('net15.ticket.messages.manager')->deleteMessage($ticketItem, $request->get('message_publicKey')); return $this->render("@TicketSupport/TicketMessage/message.block.html.twig", [ 'ticketItem' => $this->get('net15.ticket.tickets.manager')->getByPublicKey($request->get('ticket_publicKey')) ]); } }