您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

SiteSettingFactory.php 790B

3 年前
3 年前
3 年前
3 年前
3 年前
12345678910111213141516171819202122232425
  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. }