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.

32 lines
783B

  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. }