You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TicketFactory.php 648B

3 年之前
3 年之前
3 年之前
3 年之前
3 年之前
3 年之前
3 年之前
3 年之前
3 年之前
3 年之前
3 年之前
123456789101112131415161718192021222324
  1. <?php
  2. namespace Lc\SovBundle\Factory\Ticket;
  3. use App\Entity\Ticket\Ticket;
  4. use Lc\SovBundle\Factory\AbstractFactory;
  5. use Lc\SovBundle\Model\Ticket\TicketInterface;
  6. use Lc\SovBundle\Model\Ticket\TicketModel;
  7. class TicketFactory extends AbstractFactory implements TicketFactoryInterface
  8. {
  9. public function create(): TicketInterface
  10. {
  11. $ticket = new Ticket();
  12. $ticketMessageFactory = new TicketMessageFactory();
  13. $ticketMessage = $ticketMessageFactory->create($ticket) ;
  14. $ticket->setStatus(TicketModel::TICKET_STATUS_OPEN);
  15. $ticket->addTicketMessage($ticketMessage) ;
  16. return $ticket;
  17. }
  18. }