* get dataset by user * * @param string $userId * @return array|bool * @throws Exception */
(string $userId)
| 383 | * @throws Exception |
| 384 | */ |
| 385 | public function deleteByUser(string $userId) { |
| 386 | $reports = $this->ReportMapper->indexByUser($userId); |
| 387 | foreach ($reports as $report) { |
| 388 | $this->ShareService->deleteSharesByItem(ShareService::SHARE_ITEM_TYPE_REPORT, $report['id']); |
| 389 | $this->ThresholdMapper->deleteThresholdByReport($report['id']); |
| 390 | $this->setFavorite($report['id'], 'false'); |
| 391 | $this->ReportMapper->delete($report['id']); |
| 392 | } |
| 393 | return true; |
| 394 | } |
| 395 | |
| 396 | /** |
| 397 | * get own reports which are marked as favorites |
nothing calls this directly
no test coverage detected