activityRepository = $activityRepository; } public function getTemplate(Notification $notification, array $options = []): string { return '@ChillActivity/Activity/showInNotification.html.twig'; } public function getTemplateData(Notification $notification, array $options = []): array { return [ 'notification' => $notification, 'activity' => $this->activityRepository->find($notification->getRelatedEntityId()), ]; } public function supports(Notification $notification, array $options = []): bool { return $notification->getRelatedEntityClass() === Activity::class; } }