* get dataset by user * * @param string $userId * @return array|bool * @throws Exception */
(string $userId)
| 392 | * @throws Exception |
| 393 | */ |
| 394 | public function deleteByUser(string $userId) { |
| 395 | $reports = $this->ReportMapper->indexByUser($userId); |
| 396 | foreach ($reports as $report) { |
| 397 | $this->ShareService->deleteSharesByItem(ShareService::SHARE_ITEM_TYPE_REPORT, $report['id']); |
| 398 | $this->ThresholdMapper->deleteThresholdByReport($report['id']); |
| 399 | $this->setFavorite($report['id'], 'false'); |
| 400 | $this->ReportMapper->delete($report['id']); |
| 401 | } |
| 402 | return true; |
| 403 | } |
| 404 | |
| 405 | /** |
| 406 | * get own reports which are marked as favorites |
nothing calls this directly
no test coverage detected