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.

ReductionCatalogFactory.php 738B

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
12345678910111213141516171819202122232425
  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->setMerchant($merchant);
  15. $reductionCatalog->setStatus($status);
  16. return $reductionCatalog;
  17. }
  18. }