Cronjobs implemented

This commit is contained in:
2026-04-25 00:32:15 +02:00
parent 4878f750bd
commit 2e8daf78e1
10 changed files with 231 additions and 6 deletions

View File

@@ -17,11 +17,25 @@ class EventRepository {
}
public function getAvailable(bool $accessCheck = true) : array {
public function getUpcomming() : array {
return $this->getEventsByCriteria([
'archived' => false,
'registration_allowed' => true
],$accessCheck);
'upcomming' => true
]);
}
public function getAvailable(bool $accessCheck = true) : array {
$events = [];
foreach ( $this->getEventsByCriteria([
'archived' => false,
],$accessCheck) as $event) {
if ($event->start_date > now()) {
$events[] = $event;
}
};
return $events;
}
public function getForRegistration(int $id) : ?Event {