notificationService = $notificationService; } /** * get - returns the latest pending growl notification as JSON, or false when none. */ public function get(array $params = []): Response { $payload = $this->notificationService->consumeFlashNotification(); return new JsonResponse($payload !== null ? json_encode($payload) : false); } }