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

Method deleteByUser

lib/Service/PanoramaService.php:243–250  ·  view source on GitHub ↗

* get dataset by user * * @param string $userId * @return array|bool * @throws Exception */

(string $userId)

Source from the content-addressed store, hash-verified

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) {

Callers

nothing calls this directly

Calls 3

setFavoriteMethod · 0.95
indexByUserMethod · 0.45
deleteSharesByItemMethod · 0.45

Tested by

no test coverage detected