* get dataset by user * * @param string $userId * @return array|bool * @throws Exception */
(string $userId)
| 359 | * @throws Exception |
| 360 | */ |
| 361 | public function deleteByUser(string $userId) { |
| 362 | $reports = $this->ReportMapper->indexByUser($userId); |
| 363 | foreach ($reports as $report) { |
| 364 | $this->ShareService->deleteSharesByItem(ShareService::SHARE_ITEM_TYPE_REPORT, $report['id']); |
| 365 | $this->ThresholdMapper->deleteThresholdByReport($report['id']); |
| 366 | $this->setFavorite($report['id'], 'false'); |
| 367 | $this->ReportMapper->delete($report['id']); |
| 368 | } |
| 369 | return true; |
| 370 | } |
| 371 | |
| 372 | /** |
| 373 | * get own reports which are marked as favorites |
nothing calls this directly
no test coverage detected