Returns all IDs for locations that refer to $contentId.
abstract public getAllLocationIds ( integer $contentId ) : int[] | ||
$contentId | integer | |
return | int[] |
/** * Returns all IDs for locations that refer to $contentId * * @param int $contentId * * @return int[] */ public function getAllLocationIds($contentId) { try { return $this->innerGateway->getAllLocationIds($contentId); } catch (DBALException $e) { throw new RuntimeException('Database error', 0, $e); } catch (PDOException $e) { throw new RuntimeException('Database error', 0, $e); } }
/** * Deletes all versions and fields, all locations (subtree), and all relations. * * Removes the relations, but not the related objects. All subtrees of the * assigned nodes of this content objects are removed (recursively). * * @param int $contentId * * @return bool */ public function deleteContent($contentId) { $contentLocations = $this->contentGateway->getAllLocationIds($contentId); if (empty($contentLocations)) { $this->removeRawContent($contentId); } else { foreach ($contentLocations as $locationId) { $this->treeHandler->removeSubtree($locationId); } } }