create endpoints to get current event and current event new transaction
rvr-nextgen/pipeline/pr-master This commit looks good
rvr-nextgen/pipeline/pr-master This commit looks good
This commit is contained in:
4 files changed
+93
No files matched your search
@@ -53,6 +53,16 @@ class EventRepository
|
||||
yield from Container::$persistentDataManager->selectMultipleFromDb($select, Event::class, $useRelations, $withRelations);
|
||||
}
|
||||
|
||||
public function getCurrentByUser(User $user, DateTime $from, int $days, bool $useRelations = false, array $withRelations = []): ?Event
|
||||
{
|
||||
$select = $this->selectAllByUser($user);
|
||||
$this->selectUpcomingAndRecent($select, $from, $days);
|
||||
$select->orderBy('start', 'DESC');
|
||||
$select->limit(1, 0);
|
||||
|
||||
return Container::$persistentDataManager->selectFromDb($select, Event::class, $useRelations, $withRelations);
|
||||
}
|
||||
|
||||
public function getPagedByCommunity(Community $community, int $page, int $itemsPerPage, bool $useRelations = false, array $withRelations = []): Generator
|
||||
{
|
||||
$select = $this->selectAllByCommunity($community);
|
||||
|
||||
Reference in new issue
Block a user