feature/RVRNEXT-5-handling-currencies #31
@ -85,15 +85,6 @@ class CommunityController implements IAuthenticationRequired
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getMembers(Community $community): array
|
|
||||||
{
|
|
||||||
$members = iterator_to_array($this->communityMemberRepository->getAllByCommunity($community, true));
|
|
||||||
usort($members, function($a, $b) {
|
|
||||||
return strnatcmp($a->getUser()->getDisplayName(), $b->getUser()->getDisplayName());
|
|
||||||
});
|
|
||||||
return $members;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function newMember(): ?IContent
|
public function newMember(): ?IContent
|
||||||
{
|
{
|
||||||
if (!$this->checkPermission(\Container::$request->query('communityId'), true, $community, $ownCommunityMember)) {
|
if (!$this->checkPermission(\Container::$request->query('communityId'), true, $community, $ownCommunityMember)) {
|
||||||
@ -160,15 +151,6 @@ class CommunityController implements IAuthenticationRequired
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getCurrencies(Community $community): array
|
|
||||||
{
|
|
||||||
$currencies = iterator_to_array($this->currencyRepository->getAllByCommunity($community));
|
|
||||||
usort($currencies, function($a, $b) {
|
|
||||||
return strnatcmp($a->getCode(), $b->getCode());
|
|
||||||
});
|
|
||||||
return $currencies;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function newCurrency(): ?IContent
|
public function newCurrency(): ?IContent
|
||||||
{
|
{
|
||||||
if (!$this->checkPermission(\Container::$request->query('communityId'), true, $community, $ownCommunityMember)) {
|
if (!$this->checkPermission(\Container::$request->query('communityId'), true, $community, $ownCommunityMember)) {
|
||||||
@ -269,6 +251,24 @@ class CommunityController implements IAuthenticationRequired
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function getMembers(Community $community): array
|
||||||
|
{
|
||||||
|
$members = iterator_to_array($this->communityMemberRepository->getAllByCommunity($community, true));
|
||||||
|
usort($members, function($a, $b) {
|
||||||
|
return strnatcmp($a->getUser()->getDisplayName(), $b->getUser()->getDisplayName());
|
||||||
|
});
|
||||||
|
return $members;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getCurrencies(Community $community): array
|
||||||
|
{
|
||||||
|
$currencies = iterator_to_array($this->currencyRepository->getAllByCommunity($community));
|
||||||
|
usort($currencies, function($a, $b) {
|
||||||
|
return strnatcmp($a->getCode(), $b->getCode());
|
||||||
|
});
|
||||||
|
return $currencies;
|
||||||
|
}
|
||||||
|
|
||||||
private function checkPermission(
|
private function checkPermission(
|
||||||
int $communityId,
|
int $communityId,
|
||||||
bool $needToBeOwner,
|
bool $needToBeOwner,
|
||||||
|
Loading…
Reference in New Issue
Block a user