collector = $collector; $this->jobList = $jobList; $this->manager = $manager; } /** * @return DataResponse */ public function enableMonthly(): DataResponse { $this->jobList->add(MonthlyReport::class); $notification = $this->manager->createNotification(); $notification->setApp('survey_client'); $this->manager->markProcessed($notification); return new DataResponse(); } /** * @return DataResponse */ public function disableMonthly(): DataResponse { $this->jobList->remove(MonthlyReport::class); $notification = $this->manager->createNotification(); $notification->setApp('survey_client'); $this->manager->markProcessed($notification); return new DataResponse(); } /** * @return DataResponse */ public function sendReport(): DataResponse { return $this->collector->sendReport(); } }