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.

OrderReductionCreditFactory.php 1.2KB

3 jaren geleden
2 jaren geleden
3 jaren geleden
3 jaren geleden
3 jaren geleden
3 jaren geleden
3 jaren geleden
2 jaren geleden
3 jaren geleden
3 jaren geleden
1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace Lc\CaracoleBundle\Factory\Order;
  3. use Lc\CaracoleBundle\Container\Order\OrderReductionCreditContainer;
  4. use Lc\CaracoleBundle\Model\Order\OrderReductionCreditInterface;
  5. use Lc\CaracoleBundle\Model\Order\OrderShopInterface;
  6. use Lc\CaracoleBundle\Model\Reduction\ReductionCreditInterface;
  7. use Lc\SovBundle\Factory\AbstractFactory;
  8. class OrderReductionCreditFactory extends AbstractFactory
  9. {
  10. public function create(OrderShopInterface $orderShop, ReductionCreditInterface $reductionCredit): OrderReductionCreditInterface
  11. {
  12. $class = OrderReductionCreditContainer::getEntityFqcn();
  13. $orderReductionCredit = new $class;
  14. $orderReductionCredit->setOrderShop($orderShop);
  15. $orderReductionCredit->setReductionCredit($reductionCredit);
  16. $orderReductionCredit->setTitle($reductionCredit->getTitle());
  17. $orderReductionCredit->setValue($reductionCredit->getValue());
  18. $orderReductionCredit->setUnit($reductionCredit->getUnit());
  19. $orderReductionCredit->setBehaviorTaxRate($reductionCredit->getBehaviorTaxRate());
  20. $orderReductionCredit->setType($reductionCredit->getType());
  21. return $orderReductionCredit;
  22. }
  23. }