handle remote events 'isAllDay' and fix cs

This commit is contained in:
2022-06-29 15:29:22 +02:00
parent 849e7158e4
commit adad4313a6
8 changed files with 61 additions and 56 deletions

View File

@@ -45,7 +45,7 @@ class CalendarRange implements TrackCreationInterface, TrackUpdateInterface
/**
* @ORM\Column(type="datetime_immutable", nullable=false)
* @Groups({"read", "write", "calendar:read"})
* @Assert\NotNull()
* @Assert\NotNull
*/
private ?DateTimeImmutable $endDate = null;
@@ -61,41 +61,24 @@ class CalendarRange implements TrackCreationInterface, TrackUpdateInterface
* @ORM\ManyToOne(targetEntity=Location::class)
* @ORM\JoinColumn(nullable=false)
* @Groups({"read", "write", "calendar:read"})
* @Assert\NotNull()
* @Assert\NotNull
*/
private ?Location $location;
/**
* @ORM\Column(type="datetime_immutable", nullable=false)
* @groups({"read", "write", "calendar:read"})
* @Assert\NotNull()
* @Assert\NotNull
*/
private ?DateTimeImmutable $startDate = null;
/**
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User")
* @Groups({"read", "write", "calendar:read"})
* @Assert\NotNull()
* @Assert\NotNull
*/
private ?User $user = null;
/**
* @return Location|null
*/
public function getLocation(): ?Location
{
return $this->location;
}
/**
* @param Location|null $location
*/
public function setLocation(?Location $location): void
{
$this->location = $location;
}
public function getCalendar(): ?Calendar
{
return $this->calendar;
@@ -111,6 +94,11 @@ class CalendarRange implements TrackCreationInterface, TrackUpdateInterface
return $this->id;
}
public function getLocation(): ?Location
{
return $this->location;
}
public function getStartDate(): ?DateTimeImmutable
{
return $this->startDate;
@@ -136,6 +124,11 @@ class CalendarRange implements TrackCreationInterface, TrackUpdateInterface
return $this;
}
public function setLocation(?Location $location): void
{
$this->location = $location;
}
public function setStartDate(DateTimeImmutable $startDate): self
{
$this->startDate = $startDate;