Direct liunk to current event in mobile mode

This commit is contained in:
2026-06-21 00:35:25 +02:00
parent 51c4055c47
commit e9aa66a860
3 changed files with 107 additions and 30 deletions
+12
View File
@@ -20,6 +20,18 @@ class EventRepository {
}
public function getMyCurrentEvent() : ?Event {
$events = $this->getEventsByCriteria([
['archived', '=', false],
['start_date', '<=', now()],
['end_date', '>=', now()],
], true);
if (count($events) !== 1) {
return null;
}
return $events[0];
}
public function getUpcoming(int $maxCount = 5, bool $accessCheck = true) : array {
$events = [];
foreach ( $this->getEventsByCriteria([