Manager/TicketManager.php
public function createMessage(TicketInterface $ticket = null)
    {
        /* @var TicketMessageInterface $message */
        $message = new $this->ticketMessageClass();

        if ($ticket) {
            $message->setPriority($ticket->getPriority());
            $message->setStatus($ticket->getStatus());
            $message->setTicket($ticket);
        } else {
            $message->setStatus(TicketMessage::STATUS_OPEN);
        }

        return $message;
    }
public function createMessage(TicketInterface $ticket = null)
    {
        /* @var TicketMessageInterface $message */
        $message = new $this->ticketMessageClass();

        if ($ticket) {
            $message->setPriority($ticket->getPriority());
            $message->setStatus($ticket->getStatus());
            $message->setTicket($ticket);
        } else {
            $message->setStatus(TicketMessage::STATUS_OPEN);
        }

        return $message;
    }
public function createMessage ( TicketInterface $ ticket = null ) { /* @var TicketMessageInterface $message */ $ message = new $ this -> ticketMessageClass ( ) ; if ( $ ticket ) { $ message -> setPriority ( $ ticket -> getPriority ( ) ) ; $ message -> setStatus ( $ ticket -> getStatus ( ) ) ; $ message -> setTicket ( $ ticket ) ; } else { $ message -> setStatus ( TicketMessage :: STATUS_OPEN ) ; } return $ message ; }
Create a new instance of TicketMessage Entity.

@param TicketInterface $ticket

@return TicketMessageInterface
Create a new instance of TicketMessage Entity .