|
- <?php
-
- namespace Lc\CaracoleBundle\Factory\Setting;
-
- use App\Entity\Setting\MerchantSetting;
- use Lc\CaracoleBundle\Container\Setting\MerchantSettingContainer;
- use Lc\CaracoleBundle\Context\MerchantContextTrait;
- use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
- use Lc\SovBundle\Factory\AbstractFactory;
- use Lc\SovBundle\Model\File\FileInterface;
-
- class MerchantSettingFactory extends AbstractFactory
- {
-
- public function create(MerchantInterface $merchant, string $name, string $text = null, \DateTime $date = null, FileInterface $file = null)
- {
- $class = MerchantSettingContainer::getEntityFqcn();
- $merchantSetting = new $class;
-
- $merchantSetting->setMerchant($merchant);
- $merchantSetting->setName($name);
- $merchantSetting->setText($text);
- $merchantSetting->setDate($date);
- $merchantSetting->setFile($file);
-
- return $merchantSetting;
- }
- }
|