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

Method deleteData

lib/Controller/DataloadController.php:177–190  ·  view source on GitHub ↗

* delete data from input form * * @param int $reportId * @param $dimension1 * @param $dimension2 * @param bool $isDataset * @return DataResponse|NotFoundResponse */

(int $reportId, $dimension1, $dimension2, bool $isDataset)

Source from the content-addressed store, hash-verified

175 * @return DataResponse|NotFoundResponse
176 */
177 #[NoAdminRequired]
178 public function deleteData(int $reportId, $dimension1, $dimension2, bool $isDataset)
179 {
180 try {
181 $result = $this->DataloadService->deleteData($reportId, $dimension1, $dimension2, $isDataset);
182 } catch (FlexibleStorageException $e) {
183 return new DataResponse($e->toResponse(), $e->getHttpStatus());
184 }
185 if ($result) {
186 return new DataResponse($result);
187 } else {
188 return new NotFoundResponse();
189 }
190 }
191
192 /**
193 * Simulate delete data from input form

Callers

nothing calls this directly

Calls 2

toResponseMethod · 0.80
getHttpStatusMethod · 0.80

Tested by

no test coverage detected