Cronjobs implemented
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user