Você não pode selecionar mais de 25 tópicos
Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
|
- <?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;
- }
-
- }
|