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

33 行
841B

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