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.

MerchantSettingFactory.php 918B

пре 3 година
пре 2 година
пре 3 година
пре 3 година
пре 3 година
пре 3 година
пре 2 година
пре 3 година
пре 3 година
пре 3 година
12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace Lc\CaracoleBundle\Factory\Setting;
  3. use App\Entity\Setting\MerchantSetting;
  4. use Lc\CaracoleBundle\Container\Setting\MerchantSettingContainer;
  5. use Lc\CaracoleBundle\Context\MerchantContextTrait;
  6. use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
  7. use Lc\SovBundle\Factory\AbstractFactory;
  8. use Lc\SovBundle\Model\File\FileInterface;
  9. class MerchantSettingFactory extends AbstractFactory
  10. {
  11. public function create(MerchantInterface $merchant, string $name, string $text = null, \DateTime $date = null, FileInterface $file = null)
  12. {
  13. $class = MerchantSettingContainer::getEntityFqcn();
  14. $merchantSetting = new $class;
  15. $merchantSetting->setMerchant($merchant);
  16. $merchantSetting->setName($name);
  17. $merchantSetting->setText($text);
  18. $merchantSetting->setDate($date);
  19. $merchantSetting->setFile($file);
  20. return $merchantSetting;
  21. }
  22. }