* get dataset by user * * @param string $userId * @return array|bool * @throws Exception */
(string $userId)
| 260 | * @throws Exception |
| 261 | */ |
| 262 | public function deleteByUser(string $userId) { |
| 263 | $panoramas = $this->PanoramaMapper->indexByUser($userId); |
| 264 | foreach ($panoramas as $panorama) { |
| 265 | $this->ShareService->deleteSharesByItem(ShareService::SHARE_ITEM_TYPE_PANORAMA, $panorama['id']); |
| 266 | $this->setFavorite($panorama['id'], 'false'); |
| 267 | } |
| 268 | return $this->PanoramaMapper->deleteByUser($userId); |
| 269 | } |
| 270 | |
| 271 | private function isValidParent(int $parentId, ?int $itemId = null): bool { |
| 272 | if ($parentId === 0) { |
nothing calls this directly
no test coverage detected