public function remove(RevisionInterface $revision)
    {
        $connection = $this->revisionRepository->getDbAdapter()->getDriver()->getConnection()->beginTransaction();
        try {
            $this->revisionRepository->remove($revision);
            if ($revision->getReleasedAt() == null) {
                $lastReleasedRevision = $revision->getEnvironment()->getLastReleasedRevision();
                $this->revisionRepository->add(clone $lastReleasedRevision);
            }
        } catch (ExceptionInterface $e) {
            $connection->rollback();
            throw $e;
        }
        $connection->commit();
        return $this;
    }
public function remove(RevisionInterface $revision)
    {
        $connection = $this->revisionRepository->getDbAdapter()->getDriver()->getConnection()->beginTransaction();
        try {
            $this->revisionRepository->remove($revision);
            if ($revision->getReleasedAt() == null) {
                $lastReleasedRevision = $revision->getEnvironment()->getLastReleasedRevision();
                $this->revisionRepository->add(clone $lastReleasedRevision);
            }
        } catch (ExceptionInterface $e) {
            $connection->rollback();
            throw $e;
        }
        $connection->commit();
        return $this;
    }
public function remove ( RevisionInterface $ revision ) { $ connection = $ this -> revisionRepository -> getDbAdapter ( ) -> getDriver ( ) -> getConnection ( ) -> beginTransaction ( ) ; try { $ this -> revisionRepository -> remove ( $ revision ) ; if ( $ revision -> getReleasedAt ( ) == null ) { $ lastReleasedRevision = $ revision -> getEnvironment ( ) -> getLastReleasedRevision ( ) ; $ this -> revisionRepository -> add ( clone $ lastReleasedRevision ) ; } } catch ( ExceptionInterface $ e ) { $ connection -> rollback ( ) ; throw $ e ; } $ connection -> commit ( ) ; return $ this ; }
Remove specified revision.
If it's the current revision, another current revision should be recreate from last released revision.

@param RevisionInterface $revision
@throws \Zend\Db\Exception\ExceptionInterface
@return RevisionService
Remove specified revision . If it s the current revision another current revision should be recreate from last released revision .