* get dataset by user * * @param string $userId * @return array|bool * @throws Exception */
(string $userId)
| 241 | * @throws Exception |
| 242 | */ |
| 243 | public function deleteByUser(string $userId) { |
| 244 | $panoramas = $this->PanoramaMapper->indexByUser($userId); |
| 245 | foreach ($panoramas as $panorama) { |
| 246 | $this->ShareService->deleteSharesByItem(ShareService::SHARE_ITEM_TYPE_PANORAMA, $panorama['id']); |
| 247 | $this->setFavorite($panorama['id'], 'false'); |
| 248 | } |
| 249 | return $this->PanoramaMapper->deleteByUser($userId); |
| 250 | } |
| 251 | |
| 252 | private function isValidParent(int $parentId, ?int $itemId = null): bool { |
| 253 | if ($parentId === 0) { |
nothing calls this directly
no test coverage detected