|
- <?php
-
- namespace Lc\SovBundle\Factory\Setting;
-
- use App\Entity\Setting\SiteSetting;
- use Lc\SovBundle\Factory\AbstractFactory;
- use Lc\SovBundle\Model\File\FileInterface;
- use Lc\SovBundle\Model\Setting\SiteSettingInterface;
- use Lc\SovBundle\Model\Site\SiteInterface;
-
- class SiteSettingFactory extends AbstractFactory implements SiteSettingFactoryInterface
- {
- public function create(SiteInterface $site, string $name, string $text = null, \DateTime $date = null, FileInterface $file = null): SiteSettingInterface
- {
- $siteSetting = new SiteSetting();
-
- $siteSetting->setSite($site);
- $siteSetting->setName($name);
- $siteSetting->setText($text);
- $siteSetting->setDate($date);
- $siteSetting->setFile($file);
-
- return $siteSetting;
- }
- }
|