public function restoreVersion($documentVersion, $removeExisting)
    {
        $oid = spl_object_hash($documentVersion);
        $history = $this->documentHistory[$oid];
        $version = $this->documentVersion[$oid];
        $document = $this->dm->find(null, $history->getVersionableIdentifier());
        $vm = $this->session->getWorkspace()->getVersionManager();

        $vm->restore($removeExisting, $version);
        $this->dm->refresh($document);
    }
public function restoreVersion($documentVersion, $removeExisting)
    {
        $oid = spl_object_hash($documentVersion);
        $history = $this->documentHistory[$oid];
        $version = $this->documentVersion[$oid];
        $document = $this->dm->find(null, $history->getVersionableIdentifier());
        $vm = $this->session->getWorkspace()->getVersionManager();

        $vm->restore($removeExisting, $version);
        $this->dm->refresh($document);
    }
public function restoreVersion ( $ documentVersion , $ removeExisting ) { $ oid = spl_object_hash ( $ documentVersion ) ; $ history = $ this -> documentHistory [ $ oid ] ; $ version = $ this -> documentVersion [ $ oid ] ; $ document = $ this -> dm -> find ( null , $ history -> getVersionableIdentifier ( ) ) ; $ vm = $ this -> session -> getWorkspace ( ) -> getVersionManager ( ) ; $ vm -> restore ( $ removeExisting , $ version ) ; $ this -> dm -> refresh ( $ document ) ; }
Restore the document to the state it was before.

@param string $documentVersion the version name to restore
@param bool   $removeExisting  how to handle identifier collisions

@see VersionManager::restore
Restore the document to the state it was before .