Nevar pievienot vairāk kā 25 tēmas
Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
|
- <?php
-
- namespace Lc\SovBundle\Factory\Ticket;
-
- use App\Entity\Ticket\Ticket;
- use Lc\SovBundle\Factory\AbstractFactory;
- use Lc\SovBundle\Model\Ticket\TicketInterface;
- use Lc\SovBundle\Model\Ticket\TicketModel;
-
- class TicketFactory extends AbstractFactory implements TicketFactoryInterface
- {
- public function create(): TicketInterface
- {
- $ticket = new Ticket();
-
- $ticketMessageFactory = new TicketMessageFactory();
- $ticketMessage = $ticketMessageFactory->create($ticket) ;
-
- $ticket->setStatus(TicketModel::TICKET_STATUS_OPEN);
- $ticket->addTicketMessage($ticketMessage) ;
-
- return $ticket;
- }
- }
|