Skip to content

Commit

Permalink
Update event_registration.php
Browse files Browse the repository at this point in the history
  • Loading branch information
schorschy committed Nov 24, 2023
1 parent f7dcf9d commit 76d14a8
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/event_registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

class event_registration extends \rex_yform_manager_dataset
{
public static function getTotalRegistrationsByDate(int $date_id): object
public static function getTotalRegistrationsByDate(int $date_id): ?rex_yform_manager_collection
{
return self::query()->where('date_id', $date_id)->where('status', '0', '>=')->find();
}

public function getRegistrationPerson(int $status = 0, string $operator = ">="): object {
public function getRegistrationPerson(int $status = 0, string $operator = ">="): ?rex_yform_manager_collection
{
return event_registration_person::query()->where('status', $status, $operator)->where('event_date_id', self::getDateId())->find();
}

Expand All @@ -32,7 +33,7 @@ public function getCategoryId(): int
{
return $this->getValue('category_id');
}
public function getCategory(): object
public function getCategory(): ?rex_yform_manager_collection
{
return $this->getRelatedDataset('category_id');
}
Expand All @@ -42,7 +43,7 @@ public function getDateId(): int
return $this->getValue('date_id');
}

public function getDate(): object
public function getDate(): ?rex_yform_manager_collection
{
return $this->getRelatedDataset('date_id');
}
Expand Down Expand Up @@ -175,7 +176,7 @@ public function hasAcceptedPrivacyPolicy(): bool
return $this->getValue('dsgvo');
}

public static function getByUuid(string $uuid = null): ?object
public static function getByUuid(string $uuid = null): ?rex_yform_manager_collection
{
if (!$uuid) {
return null;
Expand All @@ -188,7 +189,7 @@ public function getHash(): string
return $this->getValue('hash');
}

public static function getByHash(string $hash = null): ?object
public static function getByHash(string $hash = null): ?rex_yform_manager_collection
{
if (!$hash) {
return null;
Expand Down

0 comments on commit 76d14a8

Please sign in to comment.