mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2025-01-09 06:27:56 +00:00
show events by user settings whitelist only
This commit is contained in:
parent
7aa2c03abc
commit
9c9dc5b5a4
@ -57,7 +57,9 @@ class UserController extends AbstractController
|
|||||||
return $this->render(
|
return $this->render(
|
||||||
'default/user/dashboard.html.twig',
|
'default/user/dashboard.html.twig',
|
||||||
[
|
[
|
||||||
'activities' => $activityService->findLastActivities()
|
'activities' => $activityService->findLastEvents(
|
||||||
|
$user->getEvents()
|
||||||
|
)
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -360,12 +360,16 @@ class ActivityService
|
|||||||
return $events;
|
return $events;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findLastActivities(): array
|
public function findLastEvents(
|
||||||
|
array $whitelist
|
||||||
|
): array
|
||||||
{
|
{
|
||||||
return $this->entityManagerInterface
|
return $this->entityManagerInterface
|
||||||
->getRepository(Activity::class)
|
->getRepository(Activity::class)
|
||||||
->findBy(
|
->findBy(
|
||||||
[],
|
[
|
||||||
|
'event' => $whitelist
|
||||||
|
],
|
||||||
[
|
[
|
||||||
'id' => 'DESC'
|
'id' => 'DESC'
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user