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.

28 line
628B

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