MCPcopy Create free account
hub / github.com/Rello/analytics / delete

Method delete

lib/Controller/DatasetController.php:81–93  ·  view source on GitHub ↗

* Delete Dataset and all depending objects * * @param int $datasetId * @return DataResponse * @throws \OCP\DB\Exception */

(int $datasetId)

Source from the content-addressed store, hash-verified

79 * @throws \OCP\DB\Exception
80 */
81 #[NoAdminRequired]
82 public function delete(int $datasetId) {
83 if ($this->DatasetService->isOwn($datasetId)) {
84 $reports = $this->ReportService->reportsForDataset($datasetId);
85 foreach ($reports as $report) {
86 $this->ReportService->delete((int)$report['id']);
87 }
88 $this->DatasetService->delete($datasetId);
89 return new DataResponse('true');
90 } else {
91 return new DataResponse('false');
92 }
93 }
94
95 /**
96 * get dataset details

Callers

nothing calls this directly

Calls 2

isOwnMethod · 0.45
reportsForDatasetMethod · 0.45

Tested by

no test coverage detected