/**
* Restores the current checked out document to the values of the given
* version in storage and refreshes the document object.
*
* Note that this does not change anything on the version history.
*
* The restore is immediately propagated to the backend.
*
* @see findVersionByName
*
* @param string $DocumentVersion the version to be restored
* @param bool $removeExisting how to handle conflicts with unique
* identifiers. If true, existing documents with the identical
* identifier will be replaced, otherwise an exception is thrown.
*/
public function restoreVersion($documentVersion, $removeExisting = true)
{
$this->errorIfClosed();
$this->unitOfWork->restoreVersion($documentVersion, $removeExisting);
}