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.
|
- <?php
-
- namespace Lc\CaracoleBundle\Factory\Reduction;
-
- use App\Entity\Reduction\ReductionCredit;
- use Lc\CaracoleBundle\Container\Reduction\ReductionCreditContainer;
- use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
- use Lc\CaracoleBundle\Model\Reduction\ReductionCreditInterface;
- use Lc\CaracoleBundle\Model\Reduction\ReductionCreditModel;
- use Lc\SovBundle\Factory\AbstractFactory;
-
- class ReductionCreditFactory extends AbstractFactory
- {
-
- public function create(MerchantInterface $merchant, string $type = ReductionCreditModel::TYPE_CREDIT): ReductionCreditInterface
- {
- $class = ReductionCreditContainer::getEntityFqcn();
- $reductionCredit = new $class;
-
- $reductionCredit->setMerchant($merchant);
- $reductionCredit->setType($type);
- $reductionCredit->setStatus(1);
-
- return $reductionCredit;
- }
-
- }
|