|
1234567891011121314151617181920212223242526 |
- <?php
-
- namespace Lc\SovBundle\Factory\Setting;
-
- use Lc\SovBundle\Container\Setting\SiteSettingContainer;
- 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
- {
- $class = SiteSettingContainer::getEntityFqcn();
- $siteSetting = new $class;
-
- $siteSetting->setSite($site);
- $siteSetting->setName($name);
- $siteSetting->setText($text);
- $siteSetting->setDate($date);
- $siteSetting->setFile($file);
-
- return $siteSetting;
- }
- }
|