removeReverseFieldRelations() abstract public method

Removes relations to Content with $contentId from Relation and RelationList field type fields.
abstract public removeReverseFieldRelations ( integer $contentId )
$contentId integer
 /**
  * Removes relations to Content with $contentId from Relation and RelationList field type fields.
  *
  * @param int $contentId
  */
 public function removeReverseFieldRelations($contentId)
 {
     try {
         return $this->innerGateway->removeReverseFieldRelations($contentId);
     } catch (DBALException $e) {
         throw new RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new RuntimeException('Database error', 0, $e);
     }
 }
Ejemplo n.º 2
0
 /**
  * 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);
 }