deleteFields() abstract public method

If $versionNo is set only fields for that version are deleted.
abstract public deleteFields ( integer $contentId, integer | null $versionNo = null )
$contentId integer
$versionNo integer | null
 /**
  * Deletes the fields for $contentId in $versionInfo from the database
  *
  * @param int $contentId
  * @param \eZ\Publish\SPI\Persistence\Content\VersionInfo $versionInfo
  *
  * @return void
  */
 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 all fields of $contentId in all versions.
  * If $versionNo is set only fields for that version are deleted.
  *
  * @param int $contentId
  * @param int|null $versionNo
  *
  * @return void
  */
 public function deleteFields($contentId, $versionNo = null)
 {
     try {
         return $this->innerGateway->deleteFields($contentId, $versionNo);
     } catch (DBALException $e) {
         throw new RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new RuntimeException('Database error', 0, $e);
     }
 }