|
- <?php
-
- namespace Lc\CaracoleBundle\Factory\Section;
-
- use App\Entity\Section\Opening;
- use Lc\CaracoleBundle\Factory\SectionFactoryTrait;
- use Lc\SovBundle\Factory\AbstractFactory;
- use Lc\SovBundle\Model\User\GroupUserInterface;
-
- class OpeningFactory extends AbstractFactory implements OpeningFactoryInterface
- {
- use SectionFactoryTrait;
-
- public function create(
- int $day,
- \DateTime $timeStart = null,
- \DateTime $timeEnd = null,
- GroupUserInterface $groupUser = null
- ): Opening {
- $opening = new Opening();
-
- $opening->setSection($this->section);
- $opening->setTimeStart($timeStart);
- $opening->setTimeEnd($timeEnd);
- $opening->setGroupUser($groupUser);
-
- return $opening;
- }
-
- }
|