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 lines
842B

  1. <?php
  2. namespace Lc\CaracoleBundle\Factory\Reduction;
  3. use App\Entity\Reduction\ReductionCredit;
  4. use Lc\CaracoleBundle\Context\MerchantContextTrait;
  5. use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
  6. use Lc\CaracoleBundle\Model\Reduction\ReductionCreditInterface;
  7. use Lc\CaracoleBundle\Model\Reduction\ReductionCreditModel;
  8. use Lc\CaracoleBundle\Model\Section\SectionInterface;
  9. use Lc\SovBundle\Factory\AbstractFactory;
  10. class ReductionCreditFactory extends AbstractFactory
  11. {
  12. public function create(SectionInterface $section, string $type = ReductionCreditModel::TYPE_CREDIT): ReductionCreditInterface
  13. {
  14. $reductionCredit = new ReductionCredit();
  15. $reductionCredit->setSection($section);
  16. $reductionCredit->setType($type);
  17. $reductionCredit->setStatus(1);
  18. return $reductionCredit;
  19. }
  20. }