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.

OpeningFactory.php 876B

3 jaren geleden
3 jaren geleden
3 jaren geleden
3 jaren geleden
3 jaren geleden
3 jaren geleden
123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace Lc\CaracoleBundle\Factory\Section;
  3. use App\Entity\Section\Opening;
  4. use Lc\CaracoleBundle\Context\SectionContextTrait;
  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. if($day) {
  20. $opening->setDay($day);
  21. }
  22. $opening->setTimeStart($timeStart);
  23. $opening->setTimeEnd($timeEnd);
  24. $opening->setGroupUser($groupUser);
  25. return $opening;
  26. }
  27. }