Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

29 lines
1.1KB

  1. <?php
  2. namespace Lc\CaracoleBundle\Factory\Order;
  3. use App\Entity\Order\OrderReductionCredit;
  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. $orderReductionCredit = new OrderReductionCredit();
  13. $orderReductionCredit->setOrderShop($orderShop);
  14. $orderReductionCredit->setReductionCredit($reductionCredit);
  15. $orderReductionCredit->setTitle($reductionCredit->getTitle());
  16. $orderReductionCredit->setValue($reductionCredit->getValue());
  17. $orderReductionCredit->setUnit($reductionCredit->getUnit());
  18. $orderReductionCredit->setBehaviorTaxRate($reductionCredit->getBehaviorTaxRate());
  19. $orderReductionCredit->setType($reductionCredit->getType());
  20. return $orderReductionCredit;
  21. }
  22. }