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.

27 lines
787B

  1. <?php
  2. namespace Lc\CaracoleBundle\Factory\Reduction;
  3. use App\Entity\Reduction\ReductionCatalog;
  4. use Lc\CaracoleBundle\Container\Reduction\ReductionCatalogContainer;
  5. use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
  6. use Lc\CaracoleBundle\Model\Reduction\ReductionCatalogInterface;
  7. use Lc\SovBundle\Factory\AbstractFactory;
  8. class ReductionCatalogFactory extends AbstractFactory
  9. {
  10. public function create(MerchantInterface $merchant, int $status = 1): ReductionCatalogInterface
  11. {
  12. $class = ReductionCatalogContainer::getEntityFqcn();
  13. $reductionCatalog = new $class;
  14. $reductionCatalog->setIsDisplayed(true);
  15. $reductionCatalog->setMerchant($merchant);
  16. $reductionCatalog->setStatus($status);
  17. return $reductionCatalog;
  18. }
  19. }