Nevar pievienot vairāk kā 25 tēmas
Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
|
- <?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;
- }
-
- }
|