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.

26 line
790B

  1. <?php
  2. namespace Lc\SovBundle\Factory\Setting;
  3. use App\Entity\Setting\SiteSetting;
  4. use Lc\SovBundle\Factory\AbstractFactory;
  5. use Lc\SovBundle\Model\File\FileInterface;
  6. use Lc\SovBundle\Model\Setting\SiteSettingInterface;
  7. use Lc\SovBundle\Model\Site\SiteInterface;
  8. class SiteSettingFactory extends AbstractFactory implements SiteSettingFactoryInterface
  9. {
  10. public function create(SiteInterface $site, string $name, string $text = null, \DateTime $date = null, FileInterface $file = null): SiteSettingInterface
  11. {
  12. $siteSetting = new SiteSetting();
  13. $siteSetting->setSite($site);
  14. $siteSetting->setName($name);
  15. $siteSetting->setText($text);
  16. $siteSetting->setDate($date);
  17. $siteSetting->setFile($file);
  18. return $siteSetting;
  19. }
  20. }