No puede seleccionar más de 25 temas
Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
|
- <?php
-
- namespace Lc\CaracoleBundle\Factory\Order;
-
- use Lc\CaracoleBundle\Container\Order\OrderReductionCreditContainer;
- 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
- {
- $class = OrderReductionCreditContainer::getEntityFqcn();
- $orderReductionCredit = new $class;
-
- $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;
- }
-
- }
|