Deletes the actual content object referred to by $contentId.
abstract public deleteContent ( integer $contentId ) | ||
$contentId | integer |
/** * Deletes the actual content object referred to by $contentId * * @param int $contentId * * @return void */ public function deleteContent($contentId) { try { return $this->innerGateway->deleteContent($contentId); } catch (DBALException $e) { throw new RuntimeException('Database error', 0, $e); } catch (PDOException $e) { throw new RuntimeException('Database error', 0, $e); } }
/** * 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); } $this->contentGateway->deleteRelations($contentId); $this->contentGateway->deleteVersions($contentId); $this->contentGateway->deleteNames($contentId); $this->contentGateway->deleteContent($contentId); }