Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

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. }