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

OpeningFactory.php 783B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace Lc\CaracoleBundle\Factory\Section;
  3. use App\Entity\Section\Opening;
  4. use Lc\CaracoleBundle\Model\Section\SectionInterface;
  5. use Lc\SovBundle\Factory\AbstractFactory;
  6. use Lc\SovBundle\Model\User\GroupUserInterface;
  7. class OpeningFactory extends AbstractFactory
  8. {
  9. public function create(
  10. SectionInterface $section,
  11. int $day,
  12. \DateTime $timeStart = null,
  13. \DateTime $timeEnd = null,
  14. GroupUserInterface $groupUser = null
  15. ): Opening {
  16. $opening = new Opening();
  17. $opening->setSection($section);
  18. $opening->setDay($day);
  19. $opening->setTimeStart($timeStart);
  20. $opening->setTimeEnd($timeEnd);
  21. $opening->setGroupUser($groupUser);
  22. return $opening;
  23. }
  24. }