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.

29 lines
698B

  1. <?php
  2. namespace Lc\CaracoleBundle\Factory\Ticket;
  3. use Lc\CaracoleBundle\Context\MerchantContextTrait;
  4. use Lc\CaracoleBundle\Context\SectionContextTrait;
  5. use Lc\SovBundle\Factory\Ticket\TicketFactory as SovTicketFactory;
  6. use Lc\SovBundle\Model\Ticket\TicketInterface;
  7. class TicketFactory extends SovTicketFactory
  8. {
  9. use SectionContextTrait;
  10. use MerchantContextTrait;
  11. public function create(): TicketInterface
  12. {
  13. $ticket = parent::create();
  14. if(!is_null($this->section)) {
  15. $ticket->setSection($this->section);
  16. }
  17. if(!is_null($this->merchant)) {
  18. $ticket->setMerchant($this->merchant);
  19. }
  20. return $ticket;
  21. }
  22. }