function SqlContentEntityStorage::doDeleteRevisionFieldItems

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::doDeleteRevisionFieldItems()
  2. 8.9.x core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::doDeleteRevisionFieldItems()
  3. 11.x core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::doDeleteRevisionFieldItems()

Overrides ContentEntityStorageBase::doDeleteRevisionFieldItems

File

core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php, line 639

Class

SqlContentEntityStorage
A content entity database storage implementation.

Namespace

Drupal\Core\Entity\Sql

Code

protected function doDeleteRevisionFieldItems(ContentEntityInterface $revision) {
    $this->database
        ->delete($this->revisionTable)
        ->condition($this->revisionKey, $revision->getRevisionId())
        ->execute();
    if ($this->revisionDataTable) {
        $this->database
            ->delete($this->revisionDataTable)
            ->condition($this->revisionKey, $revision->getRevisionId())
            ->execute();
    }
    $this->deleteRevisionFromDedicatedTables($revision);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.