public function deleteFields($contentId, VersionInfo $versionInfo) { foreach ($this->contentGateway->getFieldIdsByType($contentId, $versionInfo->versionNo) as $fieldType => $ids) { $this->storageHandler->deleteFieldData($fieldType, $versionInfo, $ids); } $this->contentGateway->deleteFields($contentId, $versionInfo->versionNo); }
/** * Deletes raw content data. * * @param int $contentId */ public function removeRawContent($contentId) { $this->locationGateway->removeElementFromTrash($this->loadContentInfo($contentId)->mainLocationId); foreach ($this->listVersions($contentId) as $versionInfo) { $this->fieldHandler->deleteFields($contentId, $versionInfo); } // Must be called before deleteRelations() $this->contentGateway->removeReverseFieldRelations($contentId); $this->contentGateway->deleteRelations($contentId); $this->contentGateway->deleteVersions($contentId); $this->contentGateway->deleteNames($contentId); $this->contentGateway->deleteContent($contentId); }