You are here

public function RevisionsManager::deleteRevisions in Node Revisions Autoclean 8

Deletes revisions.

Parameters

int[] $revisionsIDs: Revisions IDs to delete.

1 call to RevisionsManager::deleteRevisions()
RevisionsManager::deleteRevision in src/Services/RevisionsManager.php
Deletes a revision.

File

src/Services/RevisionsManager.php, line 189

Class

RevisionsManager
Class RevisionsManager.

Namespace

Drupal\node_revisions_autoclean\Services

Code

public function deleteRevisions(array $revisionsIDs) {
  foreach ($revisionsIDs as $revisionID) {
    try {
      $this->entityTypeManager
        ->getStorage('node')
        ->deleteRevision($revisionID);
    } catch (EntityStorageException $e) {
      watchdog_exception('node_revisions_autoclean', $e);
    }
  }
}