|
12345678910111213141516171819202122232425262728 |
- <?php
-
- namespace Lc\CaracoleBundle\Factory\Order;
-
- use App\Entity\Order\OrderReductionCredit;
- use Lc\CaracoleBundle\Model\Order\OrderReductionCreditInterface;
- use Lc\CaracoleBundle\Model\Order\OrderShopInterface;
- use Lc\CaracoleBundle\Model\Reduction\ReductionCreditInterface;
- use Lc\SovBundle\Factory\AbstractFactory;
-
- class OrderReductionCreditFactory extends AbstractFactory
- {
- public function create(OrderShopInterface $orderShop, ReductionCreditInterface $reductionCredit): OrderReductionCreditInterface
- {
- $orderReductionCredit = new OrderReductionCredit();
-
- $orderReductionCredit->setOrderShop($orderShop);
- $orderReductionCredit->setReductionCredit($reductionCredit);
- $orderReductionCredit->setTitle($reductionCredit->getTitle());
- $orderReductionCredit->setValue($reductionCredit->getValue());
- $orderReductionCredit->setUnit($reductionCredit->getUnit());
- $orderReductionCredit->setBehaviorTaxRate($reductionCredit->getBehaviorTaxRate());
- $orderReductionCredit->setType($reductionCredit->getType());
-
- return $orderReductionCredit;
- }
-
- }
|