wip: integrate with bpn-connect for admin crud, calendars

This commit is contained in:
Björn Fromme committed 2026-07-16 09:03:42 +02:00
1 parent 90b0726f0d
commit f0b68b2cc4
12 files changed
+481 -35

No files matched your search

-21
View File
@@ -200,25 +200,4 @@ class AccommodationPrice implements BlameableEntityInterface, TimestampableEntit
return $this;
}
#[Assert\Callback]
public function assertDatesValid(ExecutionContextInterface $context): void
{
// we only check new entities
if (null !== $this->getId()) {
return;
}
// come on, we need something to work with
if (null === $this->getDateFrom() || null === $this->getDateTo()) {
return;
}
if ($this->getDateFrom() < new \DateTimeImmutable()) {
$context
->buildViolation('Das Von-Datum darf nicht in der Vergangenheit liegen')
->atPath('dateFrom')
->addViolation();
}
}
}