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

SectionSettingFactory.php 879B

3 年前
3 年前
3 年前
12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace Lc\CaracoleBundle\Factory\Setting;
  3. use Lc\CaracoleBundle\Container\Setting\SectionSettingContainer;
  4. use Lc\CaracoleBundle\Model\Section\SectionInterface;
  5. use Lc\SovBundle\Factory\AbstractFactory;
  6. use Lc\SovBundle\Model\File\FileInterface;
  7. class SectionSettingFactory extends AbstractFactory
  8. {
  9. public function create(
  10. SectionInterface $section,
  11. string $name,
  12. string $text = null,
  13. \DateTime $date = null,
  14. FileInterface $file = null
  15. ) {
  16. $class = SectionSettingContainer::getEntityFqcn();
  17. $merchantSetting = new $class;
  18. $merchantSetting->setSection($section);
  19. $merchantSetting->setName($name);
  20. $merchantSetting->setText($text);
  21. $merchantSetting->setDate($date);
  22. $merchantSetting->setFile($file);
  23. return $merchantSetting;
  24. }
  25. }