You are here

public function ContentEntityStorage::deleteRevision in MongoDB 8

Delete a specific entity revision.

A revision can only be deleted if it's not the currently active one.

Parameters

int $revision_id: The revision id.

Overrides ContentEntityStorageBase::deleteRevision

File

src/Entity/ContentEntityStorage.php, line 145
Contains Drupal\mongodb\Entity\ContentEntityStorage.

Class

ContentEntityStorage

Namespace

Drupal\mongodb\Entity

Code

public function deleteRevision($revision_id) {
  $this->mongo
    ->get('entity_revision.' . $this->entityType
    ->id())
    ->remove(array(
    '_id' => $revision_id,
  ));
}