* get dataset by user * * @param string $userId * @return array|bool * @throws Exception */
(string $userId)
| 214 | * @throws Exception |
| 215 | */ |
| 216 | public function deleteByUser(string $userId) { |
| 217 | $panoramas = $this->PanoramaMapper->indexByUser($userId); |
| 218 | foreach ($panoramas as $panorama) { |
| 219 | $this->ShareService->deleteSharesByItem(ShareService::SHARE_ITEM_TYPE_PANORAMA, $panorama['id']); |
| 220 | $this->setFavorite($panorama['id'], 'false'); |
| 221 | } |
| 222 | return $this->PanoramaMapper->deleteByUser($userId); |
| 223 | } |
| 224 | |
| 225 | private function isValidParent(int $parentId, ?int $itemId = null): bool { |
| 226 | if ($parentId === 0) { |
nothing calls this directly
no test coverage detected