Direct liunk to current event in mobile mode
This commit is contained in:
@@ -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([
|
||||
|
||||
Reference in New Issue
Block a user