getType(); } public function getStatusLabel(TicketInterface $ticket): string { return 'entity.Ticket.statuChoices.'.$ticket->getStatus(); } public function getUsername(TicketInterface $ticket) { if ($ticket->getUser()) { return $ticket->getUser()->getName(); } else { return strtoupper($ticket->getVisitorLastname()).' '.$ticket->getVisitorFirstname(); } } public function getUserInfosTicket(TicketInterface $ticket) { $user = $ticket->getUser(); if ($user) { return '#'.$user->getId().' '.$user->getName().' '.$user->getEmail(); } else { return strtoupper($ticket->getVisitorLastname()).' '.$ticket->getVisitorFirstname().' '.$ticket->getVisitorEmail( ); } } public function getEmail(TicketInterface $ticket) { if ($ticket->getUser()) { return $ticket->getUser()->getEmail(); } else { return $ticket->getVisitorEmail(); } } public function getVisitorInfos(TicketInterface $ticket) { return strtoupper($ticket->getVisitorLastname()).' '.$ticket->getVisitorFirstname().' ('.$ticket->getVisitorEmail( ).')'; } public function getLastMessage(TicketInterface $ticket) { return $ticket->getTicketMessages()->last(); } }