fixup! RVRNEXT-11 add upcoming events for community
This commit is contained in:
parent
d2852b0bd9
commit
669a012db4
@ -11,6 +11,7 @@ use RVR\Repository\CommunityRepository;
|
|||||||
use RVR\Repository\CommunityMemberRepository;
|
use RVR\Repository\CommunityMemberRepository;
|
||||||
use RVR\Repository\CurrencyExchangeRateRepository;
|
use RVR\Repository\CurrencyExchangeRateRepository;
|
||||||
use RVR\Repository\CurrencyRepository;
|
use RVR\Repository\CurrencyRepository;
|
||||||
|
use RVR\Repository\EventRepository;
|
||||||
use RVR\Repository\TransactionRepository;
|
use RVR\Repository\TransactionRepository;
|
||||||
use RVR\Repository\UserRepository;
|
use RVR\Repository\UserRepository;
|
||||||
use SokoWeb\Interfaces\Authentication\IAuthenticationRequired;
|
use SokoWeb\Interfaces\Authentication\IAuthenticationRequired;
|
||||||
@ -32,6 +33,8 @@ class CommunityController implements IAuthenticationRequired
|
|||||||
|
|
||||||
private TransactionRepository $transactionRepository;
|
private TransactionRepository $transactionRepository;
|
||||||
|
|
||||||
|
private EventRepository $eventRepository;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->userRepository = new UserRepository();
|
$this->userRepository = new UserRepository();
|
||||||
@ -40,6 +43,7 @@ class CommunityController implements IAuthenticationRequired
|
|||||||
$this->currencyRepository = new CurrencyRepository();
|
$this->currencyRepository = new CurrencyRepository();
|
||||||
$this->currencyExchangeRatesRepository = new CurrencyExchangeRateRepository();
|
$this->currencyExchangeRatesRepository = new CurrencyExchangeRateRepository();
|
||||||
$this->transactionRepository = new TransactionRepository();
|
$this->transactionRepository = new TransactionRepository();
|
||||||
|
$this->eventRepository = new EventRepository();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isAuthenticationRequired(): bool
|
public function isAuthenticationRequired(): bool
|
||||||
@ -75,7 +79,7 @@ class CommunityController implements IAuthenticationRequired
|
|||||||
|
|
||||||
return new HtmlContent('communities/community', [
|
return new HtmlContent('communities/community', [
|
||||||
'community' => $community,
|
'community' => $community,
|
||||||
'upcomingEvents' => [],
|
'upcomingEvents' => iterator_to_array($this->eventRepository->getUpcomingByCommunity($community, new DateTime(), 3)),
|
||||||
'debtItems' => $debtItems,
|
'debtItems' => $debtItems,
|
||||||
'debtBalance' => $debtBalance,
|
'debtBalance' => $debtBalance,
|
||||||
'outstandingItems' => $outstandingItems,
|
'outstandingItems' => $outstandingItems,
|
||||||
|
Loading…
Reference in New Issue
Block a user